[lug] C extensions of PostgreSQL

B Giles bldrbear at hotmail.com
Wed Aug 6 09:40:22 MDT 2003


You don't link against pq, you link against the internal library.  I haven't 
written user-defined functions or types since 7.1, but it's probably 
something like pq-int.

Backend programming is very different from the frontend, although it might 
not be too bad if you're just writing a user-defined function.  User-defined 
types are a whole 'nother thing - you have to worry about TOASTability, 
accessor functions if it's a composite object, possibly type-specific 
indexing, etc.

Bear

>From: "D. Stimits" <stimits at comcast.net>
>Reply-To: lug at lug.boulder.co.us
>To: BLUG <lug at lug.boulder.co.us>
>Subject: [lug] C extensions of PostgreSQL
>Date: Wed, 06 Aug 2003 06:29:26 -0600
>
>I'm trying to write a C function for PostgreSQL on RH 7.3 (KRUD), and 
>running into a problem. The C code must apparently link against a library 
>that provides functions "CurrentMemoryContext" and "MemoryContextAlloc" 
>(probably due to palloc). I've been digging around with nm and fail to find 
>it. I'm currently linking as:
>   -lkrb5 -lk5crypto -lcom_err -lpq -ldl
>
>Can someone tell me what I am missing?
>
>D. Stimits, stimits AT comcast DOT net
>
>_______________________________________________
>Web Page:  http://lug.boulder.co.us
>Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the LUG mailing list