lots of errors from fmgr.h when I try to write a C UDF
От | Anh Pham |
---|---|
Тема | lots of errors from fmgr.h when I try to write a C UDF |
Дата | |
Msg-id | CAL7AQBZ8Sw8GKmq0PoWk82GGoku4F6m7Qnm=+6jidrDY5KRngg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: lots of errors from fmgr.h when I try to write a C UDF
|
Список | pgsql-novice |
Hi,
I had Postgres 9.3 setup and run successfully in Eclipse (MacOSX)#include <fmgr.h>
...
#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif
...
...
#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif
...
However, when I tried to compile the code:
gcc -fpic -c ...
It gave me a lot of errors and warnings from fmgr.h:
...
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:59:2: error: unknown type name 'MemoryContext'
MemoryContext fn_mcxt; /* memory context to store fn_extra in */
^
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:71:2: error: unknown type name 'Oid'
Oid fncollation; /* collation for function to use */
^
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:72:2: error: unknown type name 'bool'
bool isnull; /* function must set true if result is NULL */
...
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:59:2: error: unknown type name 'MemoryContext'
MemoryContext fn_mcxt; /* memory context to store fn_extra in */
^
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:71:2: error: unknown type name 'Oid'
Oid fncollation; /* collation for function to use */
^
/Users/atpham/workspacecdt/pgsql/src/include/fmgr.h:72:2: error: unknown type name 'bool'
bool isnull; /* function must set true if result is NULL */
...
Any suggestion where I did it wrong?
Thank you :)
В списке pgsql-novice по дате отправления: