Re: Problems using palloc in postgresql user C functions

From: John Gunther <inbox(at)bucksvsbytes(dot)com>
To:
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems using palloc in postgresql user C functions
Date: 2003-03-21 08:19:55
Message-ID: 3E7ACB2B.1020204@bucksvsbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thank you, gentlemen. With your kind assistance, I've succeeded in
creating my first C language pg function..

Joe Conway wrote:

> Tom Lane wrote:
>
>> I'd suggest building one of the backend-extension modules in contrib/,
>> and looking to see what commands get used to compile and link on your
>> platform.
>>
>
> Another suggestion is to put your extension in a directory under
> contrib, and copy and edit another contrib's Makefile. They are pretty
> simple, e.g. let's say your library is called foo, and you put foo.c,
> foo.h, and foo.sql.in in contrib/foo. Your Makefile would look like:
>
> 8<-------------------------------------
> subdir = contrib/foo
> top_builddir = ../..
> include $(top_builddir)/src/Makefile.global
>
> MODULES = foo
> DATA_built = foo.sql
>
> include $(top_srcdir)/contrib/contrib-global.mk
> 8<-------------------------------------
>
> Now you can do (from contrib/foo):
>
> make
> make install
> psql myfoodatabase < foo.sql
>
> to build and install foo.so.
>
> For more info on the contrib Makefile layout and variables, look at
> the comments in contrib/contrib-global.mk
>
> Joe
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Crombleholme, Roy 2003-03-21 11:16:33 table sequence
Previous Message Donald Tucker 2003-03-20 21:47:47 DBD::Pg installation difficulty during make test