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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anh Pham <atpham(dot)wpi(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: lots of errors from fmgr.h when I try to write a C UDF
Date: 2014-02-01 05:49:40
Message-ID: 13203.1391233780@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-novice

Anh Pham <atpham(dot)wpi(at)gmail(dot)com> writes:
> I am trying to write a C user-defined function:

> *#include <fmgr.h>*
> *...*
> *#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:

Most Postgres backend header files assume that you've included
postgres.h first ... did you do that?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message prashant Pandey 2014-02-01 08:20:07 manual and autovacuum
Previous Message Anh Pham 2014-02-01 04:34:45 Re: Fwd: lots of errors from fmgr.h when I try to write a C UDF

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Paquier 2014-02-01 11:52:29 Re: Fwd: lots of errors from fmgr.h when I try to write a C UDF
Previous Message Anh Pham 2014-02-01 04:34:45 Re: Fwd: lots of errors from fmgr.h when I try to write a C UDF