Re: PG Extensions: Must be statically linked?

From: John Gray <jgray(at)azuli(dot)co(dot)uk>
To: cjames(at)modgraph-usa(dot)com
Subject: Re: PG Extensions: Must be statically linked?
Date: 2006-03-03 00:27:20
Message-ID: pan.2006.03.03.00.27.18.814931@azuli.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matthew T. O'Connor 2006-03-03 00:36:18 Re: Automatic free space map filling
Previous Message Tom Lane 2006-03-03 00:23:01 Re: [NOVICE] pg_config --pgxs