Re: more docs on extending postgres in C - Mailing list pgsql-general

From Dimitri Fontaine
Subject Re: more docs on extending postgres in C
Date
Msg-id m2tyucbo9i.fsf@hi-media.com
Whole thread Raw
In response to Re: more docs on extending postgres in C  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> - installing postgresql-server-dev-[version]
> - apt-get source postgresql-server-dev-[version]
> - copy from there a contrib dir in my ~ (or wherever you prefer)
> - export USE_PGXS=1; make

Don't forget apt-get build-dep postgresql-[version]

> I didn't have postgresql server installed on this box but I have
> stuff that got in to satisfy dependencies for php/python pg drivers
> and psql.
> I wasn't able to understand from where PGXS pick up the version
> since I installed -dev-8.3 but everything else was for 8.4 and it
> didn't work:

See pg_config, there's the default one then one per major version.

> Thanks... I'd publish a summary as soon as I've clearer ideas so
> that the next poor guy will find easier to write contrib on Debian.
>
> I don't know if the version problem is worth a bug report to Debian
> (or pg people that built the pgxs system).

I' working on this, see the following email and thread.

  http://lists.alioth.debian.org/pipermail/pkg-postgresql-public/2010-January/000546.html

In short it's about doing a VPATH build and setting some variables, then
building a PGXS extension is very easy.

Regards,
--
dim

pgsql-general by date:

Previous
From: Lew
Date:
Subject: Re: Mapping Java BigDecimal
Next
From: John R Pierce
Date:
Subject: Re: Slow Query / Check Point Segments