Hello,

I built a c function that exports data from various tables into a text file but 
when I compile the function I get this error:

In file included from /usr/include/pgsql/server/postgres.h:48,
                 from myfile.c:1:
/usr/include/pgsql/server/utils/elog.h:69:28: error: utils/errcodes.h: No such 
file or directory

If I remove the utils/ folder in front of the errcodes.h file in elog.h then it 
works. 

The only think I don't like (but I can live with...) is that every time I 
install a new version of postgres I have to edit 
/usr/include/pgsql/server/utils/elog.h file and change the line:
#include "utils/errcodes.h"
into 
#include "errcodes.h"

Is there possible to get this fixed in the future release? I am using Suse 
compiled versions of Postgres. 

Here is the "very" simplified version of my function:

#include "/usr/include/pgsql/server/postgres.h"
#include "/usr/include/pgsql/server/fmgr.h"

#ifdef PG_MODULE_MAGIC
PG_MODULE_MAGIC;
#endif


PG_FUNCTION_INFO_V1(initializefile);

Datum
initializefile(PG_FUNCTION_ARGS)
{
    PG_RETURN_INT32(1);
}

 
Thank you,
Ioana

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to