Re: database session variables

From: Mike Mascari <mascarm(at)mascari(dot)com>
To: Mark Wilson <mark(at)mediasculpt(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: database session variables
Date: 2002-10-03 00:49:42
Message-ID: 3D9B9426.3000401@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Mark Wilson wrote:
> Mike, Thanks heaps for your help here. I'll try that (although I'm a bit of
> a freebsd/c newbie).
>
> My system didn't have postgres.h, so I'm using postgres_fe.h instead. In
> addition, I don't have fmgr.h. I downloaded version 1.18 of it from
> http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/fmgr.h?s
> ortby=date&only_with_tag=REL7_2_STABLE, but the first gcc line produced a
> number of compiler errors and warnings, starting with:
> fmgr.h:30: syntax error before `*'
> fmgr.h:30: `Datum' declared as function returning a function
>
> line 30 of fmgr.h is
> typedef Datum (*PGFunction) (FunctionCallInfo fcinfo);
>
> Do you know what is causing this? (gcc version:gcc-2.95.3)

To write server-side C functions you need to be able to include
all of the server headers that the C interface requires. When
installing PostgreSQL, one normally either does a:

./configure
gmake
gmake install

However, to do server-side development, you also have to do:

gmake install-all-headers

or, if you are using binary packages you need to install the
appropriate package that contains the server-side development
headers. For RPMS, the package is:

postgresql-devel

You should then have all the headers necessary for server-side C
development.

Hope that helps,

Mike Mascari
mascarm(at)mascari(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message cbbrowne 2002-10-03 00:58:25 Re: Anyone want to assist with the translation of the
Previous Message Rod Taylor 2002-10-03 00:14:00 Re: [HACKERS] Anyone want to assist with the translation of the