C++ and SPI - Mailing list pgsql-hackers

From Andrij Korud
Subject C++ and SPI
Date
Msg-id Pine.BSF.3.96.991120192202.53212A-100000@NetSurfer.lp.lviv.ua
Whole thread Raw
List pgsql-hackers
Hi,
I'm trying to compile SPI function written on C++.
Compile fail on using C++ keywords (typeid, typename) in header files. 
Wrapping #include in extern "C" {} don't help.
Here is output of the compiler:


++ -I/home/akorud/develop/postgresql-6.5.3/src/include
-I/usr/local/pgsql/include -traditional -o dialup.o -c dialup.cpp
In file included from
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/relation.h:16,                from
/home/akorud/develop/postgresql-6.5.3/src/include/executor/spi.h:14,                from dialup.cpp:4:
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/parsenodes.h:698:
parse error before `typename'
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/parsenodes.h:738:
parse error before `typename'
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/parsenodes.h:770:
parse error before `typename'
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/parsenodes.h:874:
parse error before `;'
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/parsenodes.h:875:
parse error before `typename'
In file included from
/home/akorud/develop/postgresql-6.5.3/src/include/utils/rel.h:17,                from
/home/akorud/develop/postgresql-6.5.3/src/include/access/relscan.h:17,                from
/home/akorud/develop/postgresql-6.5.3/src/include/nodes/execnodes.h:19,                from
/home/akorud/develop/postgresql-6.5.3/src/include/executor/spi.h:15,                from dialup.cpp:4:
/home/akorud/develop/postgresql-6.5.3/src/include/access/tupdesc.h:74:
parse error before `typeid'


Any suggestions?

Thanks in advance, 
Andriy Korud, Lviv, Ukraine.




pgsql-hackers by date:

Previous
From: Martin Weinberg
Date:
Subject: Bulk update of large database
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Bulk update of large database