Re: more on undefined reference to 'pg_detoast_datum'
От | D. Stimits |
---|---|
Тема | Re: more on undefined reference to 'pg_detoast_datum' |
Дата | |
Msg-id | 3F8A64DF.1080008@comcast.net обсуждение исходный текст |
Ответ на | more on undefined reference to 'pg_detoast_datum' and libpq ("D. Stimits" <stimits@comcast.net>) |
Ответы |
Re: more on undefined reference to 'pg_detoast_datum'
Re: more on undefined reference to 'pg_detoast_datum' |
Список | pgsql-interfaces |
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
В списке pgsql-interfaces по дате отправления: