Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Z0yws-0003G1-0l for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2015 21:14:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Z0ywr-0001XK-GM for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Jun 2015 21:14:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Z0xgt-0002dB-3Z for pgsql-bugs@postgresql.org; Fri, 05 Jun 2015 19:54:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Z0xgp-0001mK-Kg for pgsql-bugs@postgresql.org; Fri, 05 Jun 2015 19:54:06 +0000 MIME-Version: 1.0 Subject: BUG #13404: Docs do not mention "access/htup_details.h" for C functions using heap_form_tuple To: pgsql-bugs@postgresql.org From: christianr@fastmail.com Date: Fri, 05 Jun 2015 19:53:49 +0000 Message-ID: <20150605195349.22140.41708@wrigleys.postgresql.org> X-Pg-Spam-Score: -0.3 (/) Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13404 Logged by: Christian Reinke Email address: christianr@fastmail.com PostgreSQL version: 9.4.2 Operating system: Linux Description: Bug report regarding: PostgreSQL 9.4.2 Documentation (in HTML format) Section 35.9. C-Language Functions Section 35.9.8. Returning Rows (Composite Types) PostgreSQL version: 9.4.2. Debian packages: postgresql-9.4, postgresql-doc-9.4, postgresql-server-dev-9.4, etc., all version 9.4.2-0+deb8u1. Platform: Linux ... 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8u1 (2015-04-24) x86_64 GNU/Linux. I tried to compile a C-language function that uses the function heap_form_tuple and got a warning because its declaration was missing: gcc -I/usr/include/postgresql/9.4/server -Wall -c -fpic -lm -g test1.c test1.c: In function ‘test1’: test1.c:246:3: warning: implicit declaration of function ‘heap_form_tuple’ [-Wimplicit-function-declaration] result_tuple = heap_form_tuple (result_tuple_desc, dat, isnull); ^ test1.c compiled without this warning under PostgreSQL 9.1. test1.c included the following PostgreSQL header files: #include "postgres.h" #include "fmgr.h" #include "funcapi.h" #include "executor/executor.h" test1.c compiles successfully under PostgreSQL 9.4 if I, also, include: #include "access/htup_details.h" 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? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs