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

From Tom Lane
Subject Re: more docs on extending postgres in C
Date
Msg-id 1556.1264176166@sss.pgh.pa.us
Whole thread Raw
In response to Re: more docs on extending postgres in C  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Responses Re: more docs on extending postgres in C  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
List pgsql-general
Ivan Sergio Borgonovo <mail@webthatworks.it> writes:
> If I had to build stuff in the pg source tree I'd just clone a
> contrib directory and change the makefile [1]. What am I supposed to
> do if I'd like to create a contrib elsewhere (eg.
> ~/Documents/nfs/projects/ts_extensions)?

Use PGXS:
http://www.postgresql.org/docs/8.4/static/xfunc-c.html#XFUNC-C-PGXS

If the docs aren't enough for you, all of the contrib modules can be
built via pgxs, using "make PGXS=1".  So their makefiles are useful
examples.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error "invalid byte sequence for encoding UTF8" on insert into BYTEA column
Next
From: Vincenzo Romano
Date:
Subject: Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan