From: D. Stimits <stimits@comcast.net>
Cc: postgresql <pgsql-interfaces@postgresql.org>
Subject: Re: more on undefined reference to 'pg_detoast_datum'
Date: Mon, 13 Oct 2003 02:39:59 -0600
Message-ID: <3F8A64DF.1080008@comcast.net> (raw)
In-Reply-To: <3F886324.8020707@comcast.net>
References: <3F886324.8020707@comcast.net>
<558.1065936082@sss.pgh.pa.us>
Tom Lane wrote:
> "D. Stimits" writes:
>
> >Apparently in PosgreSQL 7.2.3 (the Redhat 7.3 version, which has some
> >patching involved), pg_detoast_datum is defined in fmgr backend code,
> >but this function is not defined anywhere in any library, especially not
> >libpq.
>
>
> Of course not; it's a backend function. Your problem is that you are
> trying to build a server-side function as though it were a client
> application. You're linking to an inappropriate set of libraries.
> See the contrib modules for numerous examples of correct link setup
> for server-side functions.
>
> regards, tom lane
>
My attempt to try linking against some of the client libraries was to
find a link source for CurrentMemoryContext and MemoryContextAlloc. The
headers for backend development include prototypes as extern for many
functions, such as those above. It's painfully obvious that glibc does
not provide these definitions, and it is obvious also that the client
libraries do not implement these. My question is, where the heck is
CurrentMemoryContext and MemoryContextAlloc provided as an
implementation which I can link with? It looks like the Redhat 7.3
(PostgreSQL 7.2.3) devel rpm package is missing the library needed. Or
perhaps there is no such library, and I'd be required to drop my code
into the complete source of the SQL server itself, which is most
inconvenient. How the heck do I find an implentation of
CurrentMemoryContext and MemoryContextAlloc? Running ldd on sample
contrib libraries leads me to believe that in order to build this code,
I must have a built full PostgreSQL source installed and configured, and
that these functions are not available as a linkable library. Which .o
object file would I link? Why isn't CurrentMemoryContext or
MemoryContextAlloc available in a linkable library instead?
D. Stimits
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: stimits@comcast.net
Subject: Re: more on undefined reference to 'pg_detoast_datum'
In-Reply-To: <3F8A64DF.1080008@comcast.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox