Re: Problems using palloc in postgresql user C functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Gunther <inbox(at)bucksvsbytes(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems using palloc in postgresql user C functions
Date: 2003-03-19 14:22:46
Message-ID: 6473.1048083766@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

John Gunther <inbox(at)bucksvsbytes(dot)com> writes:
> In line with your responses, I'm already supplying my library with the
> prototypes for all the needed PG functions, like textin. The problem is
> when compiling and linking, how does libtool/gcc find or point to the
> actual code for textin so it can execute it when needed.

It doesn't. You should be building a shared library, not a standalone
executable. Unresolved references get bound when the library is loaded
by the backend, not when the library is built.

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.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2003-03-19 15:01:23 Re: Problems using palloc in postgresql user C functions
Previous Message Martin Ruff 2003-03-19 10:28:31 pg_dump ,pg_restore problem