Problems using palloc in postgresql user C functions

From: John Gunther <inbox(at)bucksvsbytes(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Problems using palloc in postgresql user C functions
Date: 2003-03-19 03:08:07
Message-ID: 3E77DF17.105@bucksvsbytes.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Since I'm a novice C programmer, this may be a bonehead question, so
please be gentle if the answer is obvious.

I'm creating a shared library of PostgreSQL user functions written in C.
A couple of PG facilities appear very convenient or essential tools for
use in user functions: the palloc function (to allocate PG memory) and
the PG_STR_GET_TEXT and PG_TEXT_GET_STR macros (used to convert between
PG text strings and regular C strings). The problem that arises when I
use these, though, is that they generate unresolved references,
requiring including a seemingly endless chain of dependent PG source
files in the compilation of the library.

Am I way off here, or does using these features massively complicate
compiling and linking my library?

Thanks for any enlightenment?

John Gunther

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jonathon Batson 2003-03-19 04:09:51 Re: Last access time for a table
Previous Message Sunil Gollapaly 2003-03-19 02:34:10 Regardin storing images