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