On Thu, 02 Mar 2006 13:43:35 -0800, Craig A. James wrote:
> I'm creating user-defined server extensions, written in C per the manual
[snip]
> Is this correct? Do Postgres extension need to be fully statically
> linked? Or is there some configuration that will specify LD_LIBRARY_PATH
> (or perhaps a Postgres-specific equivalent).
>
Not generally, unless your platform requires it because of restrictive
dynamic loader behaviour. contrib/xml2 uses two external libraries
(libxml and libxslt) - they are dynamically referenced by the resulting
pgxml.so. Have a look at the Makefile for contrib/xml2 for hints on
options?
> The manual's instructions are good regarding writing code, but don't say
> much about linking.
>
True - but I think the assumption has been that most
people wouldn't have any involved linking requirements. Your case doesn't
come into this category, but there are useful cases for linking to
external function libraries and exposing them to PG.
Regards
John