Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple
Date
Msg-id 20150605215022.GA133018@postgresql.org
Whole thread Raw
In response to BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple  (christianr@fastmail.com)
Responses Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple
List pgsql-bugs
christianr@fastmail.com wrote:

> PostgreSQL 9.1 included the declaration of heap_form_tuple along the
> sequence funcapi.h, executor/tuptable.h and access/htup.h.  In
> PostgreSQL 9.4, the declaration of heap_form_tuple moved from
> access/htup.h to a new header file access/htup_details.h, which is not
> included by funcapi.h.
>
> The HTML documentation, however, seems to say in Section 35.9.8. that it
> is sufficient to include funcapi.h to get all the definitions required
> for functions returning rows (composite types).
>
> Is this a bug, or did I miss something?

Hmm.  So there are two ways to fix this bug.  One is to #include
"access/htup_details.h" in funcapi.h as you propose; the other is to
change the docs to state that heap_form_tuple is in htup_details and you
need to include that separately if you want it.

I could go both ways, but seeing as we changed this in 9.3 and many
people since then first complained and then tweaked their code to cope
by #including htup_details.h, I think changing the docs is the reasonable
option.  You can write functions without using heap_form_tuple, after
all.

Other opinions?

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-bugs by date:

Previous
From: christianr@fastmail.com
Date:
Subject: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple
Next
From: Tom Lane
Date:
Subject: Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple