Client-side libraries for fmgr invocation - Mailing list pgsql-novice

From Tony Griffiths
Subject Client-side libraries for fmgr invocation
Date
Msg-id 3D0EEE2E.3D863772@cs.man.ac.uk
Whole thread Raw
List pgsql-novice
Hi,
I would like to invoke some of the functions defined on some
user-defined types (i.e., the geometric type 'BOX') from a client-side
program written in C. I.e., I want to write something along the lines
of:

#include <postgres.h>
#include <utils/geo_decls.h>
#include <fmgr.h>

char bbox_string[500];
// process the string

BOX* __tmp;
Datum d = DirectFunctionCall1(box_in, BoxPGetDatum(bbox_string));
__tmp = DatumGetBoxP(d);

All this compiles ok, but I can't find which library to link in to get
the call to DirectFunctionCall1 recognised. Can anyone advise me on the
correct linkage procedure?

Many thanks,
--
Tony

---------------------------------
Dr. Tony Griffiths
Research Fellow
Information Management Group,
Department of Computer Science,
The University of Manchester,
Oxford Road,
Manchester M13 9PL,
United Kingdom

Tel. +44 (0) 161 275 6139
Fax +44 (0) 161 275 6236
email tony.griffiths@cs.man.ac.uk
---------------------------------

pgsql-novice by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: function delete problems
Next
From: John Taylor
Date:
Subject: Which indexes to drop