Re: Using libpq to access a repote database from a c trigger function breaks. - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: Using libpq to access a repote database from a c trigger function breaks.
Date
Msg-id Pine.LNX.4.30.0103072035050.986-100000@peter.localdomain
Whole thread Raw
In response to Re: Using libpq to access a repote database from a c trigger function breaks.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Tom Lane writes:

> pgsql-bugs@postgresql.org writes:
> > Using libpq to access a repote database from a c trigger function breaks.
>
> Try linking libpq.a into your .so file.  I think your references to
> PQexec and so forth are being resolved to the
> similarly-named-but-completely-different functions that exist in the
> backend (see src/backend/libpq).  There is no copy of client libpq in
> the standard backend.

You might also want to try to sneak in a -Bsymbolic option (or
-Wl,-Bsymbolic, respectively) on your link command line.  On ELF systems,
symbols in the executable override symbols in the shared library unless
you use this option.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/

pgsql-bugs by date:

Previous
From: Jean-Francois Rabasse
Date:
Subject: Pbm with aggregates on empty output
Next
From: Peter Eisentraut
Date:
Subject: Re: Pbm with aggregates on empty output