Re: [GENERAL] Fwd: lots of errors from fmgr.h when I try to write a C UDF

2014-02-01 Thread Michael Paquier
On Sat, Feb 1, 2014 at 1:34 PM, Anh Pham wrote: > Hi, > I actually included 'postgres.h' > > However I found out that when I stopped the server, the code then compiled > successfully. Code compilation and a server status are not related as compilation of Postgres-related modules require the librar

Re: [GENERAL] Fwd: lots of errors from fmgr.h when I try to write a C UDF

2014-01-31 Thread Anh Pham
Hi, I actually included 'postgres.h' However I found out that when I stopped the server, the code then compiled successfully. It's weird On Fri, Jan 31, 2014 at 10:53 PM, Ian Lawrence Barwick wrote: > 2014-02-01 Anh Pham : > > Hi, > > I had Postgres 9.3 setup and run successfully in Eclipse (Ma

Re: [GENERAL] Fwd: lots of errors from fmgr.h when I try to write a C UDF

2014-01-31 Thread Ian Lawrence Barwick
2014-02-01 Anh Pham : > Hi, > I had Postgres 9.3 setup and run successfully in Eclipse (MacOSX) > I am trying to write a C user-defined function: > > #include > ... > #ifdef PG_MODULE_MAGIC > PG_MODULE_MAGIC; > #endif > ... > > However, when I tried to compile the code: > gcc -fpic -c ... > It gav

[GENERAL] Fwd: lots of errors from fmgr.h when I try to write a C UDF

2014-01-31 Thread Anh Pham
Hi, I had Postgres 9.3 setup and run successfully in Eclipse (MacOSX) I am trying to write a C user-defined function: *#include * *...* *#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 fr