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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple
Дата
Msg-id 20150605215022.GA133018@postgresql.org
обсуждение исходный текст
Ответ на BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple  (christianr@fastmail.com)
Ответы Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: christianr@fastmail.com
Дата:
Сообщение: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple