Hi everyone, >From what i've read in the documentation you need funcapi.h to return SETOF from a C function, the problem is when I include the header file the compile throws heaps of errors; offending code 1. extern "C" { 2. #include <postgres.h> 3. #include <fmgr.h> 4. #include <funcapi.h> 5. 6. #ifdef PG_MODULE_MAGIC 7. PG_MODULE_MAGIC; 8. #endif 9. }; Gives the errors: In file included from /usr/include/pgsql/server/access/heapam.h:21, from /usr/include/pgsql/server/nodes/execnodes.h:18, from /usr/include/pgsql/server/executor/execdesc.h:18, from /usr/include/pgsql/server/executor/executor.h:17, from /usr/include/pgsql/server/funcapi.h:21, from xapian.cpp:4: /usr/include/pgsql/server/nodes/primnodes.h:1155: error: expected unqualified-id before ‘using’ /usr/include/pgsql/server/nodes/primnodes.h:1155: error: expected ‘;’ before ‘using’ In file included from /usr/include/pgsql/server/executor/executor.h:18, from /usr/include/pgsql/server/funcapi.h:21, from xapian.cpp:4: /usr/include/pgsql/server/nodes/parsenodes.h:176: error: expected unqualified-id before ‘typeid’ /usr/include/pgsql/server/nodes/parsenodes.h:259: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:259: error: expected ‘;’ before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:459: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:459: error: expected ‘;’ before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:556: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:556: error: expected ‘;’ before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:1168: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:1168: error: expected ‘;’ before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:1672: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:1672: error: expected ‘;’ before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:2086: error: expected unqualified-id before ‘typename’ /usr/include/pgsql/server/nodes/parsenodes.h:2086: error: expected ‘;’ before ‘typename’ Any thoughts? Thanks -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general