Re: more docs on extending postgres in C

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: more docs on extending postgres in C
Date: 2010-01-22 16:02:46
Message-ID: 1556.1264176166@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ivan Sergio Borgonovo <mail(at)webthatworks(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincenzo Romano 2010-01-22 16:19:54 Re: Shall I convert all my stored procedure to use "EXECUTE", to ensure I get index-scan
Previous Message Andrés 2010-01-22 15:59:10 Re: PostreSQL PostgreSQL 8.1.18 and Tsearch2 context error