X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 7A377D1B4E1 for ; Mon, 13 Oct 2003 08:40:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 50243-03 for ; Mon, 13 Oct 2003 05:39:39 -0300 (ADT) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by svr1.postgresql.org (Postfix) with ESMTP id 10D51D1B4EF for ; Mon, 13 Oct 2003 05:39:37 -0300 (ADT) Received: from comcast.net (12-253-72-16.client.attbi.com[12.253.72.16]) by comcast.net (rwcrmhc12) with SMTP id <20031013083938014009lerbe> (Authid: stimits); Mon, 13 Oct 2003 08:39:38 +0000 Message-ID: <3F8A64DF.1080008@comcast.net> Date: Mon, 13 Oct 2003 02:39:59 -0600 From: "D. Stimits" Reply-To: stimits@comcast.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021018 X-Accept-Language: en-us, en MIME-Version: 1.0 Cc: postgresql Subject: Re: more on undefined reference to 'pg_detoast_datum' References: <3F886324.8020707@comcast.net> <558.1065936082@sss.pgh.pa.us> In-Reply-To: <3F886324.8020707@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/26 X-Sequence-Number: 4515 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