Problems using palloc in postgresql user C functions - Mailing list pgsql-novice

From John Gunther
Subject Problems using palloc in postgresql user C functions
Date
Msg-id 3E77DF17.105@bucksvsbytes.com
Whole thread Raw
Responses Re: Problems using palloc in postgresql user C functions  (Joe Conway <mail@joeconway.com>)
List 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




pgsql-novice by date:

Previous
From: "Ville Jungman"
Date:
Subject: Re: perl and postgresql
Next
From: Jonathon Batson
Date:
Subject: Re: Last access time for a table