Client-side libraries for fmgr invocation

From: Tony Griffiths <tony(dot)griffiths(at)cs(dot)man(dot)ac(dot)uk>
To: pgsql-nov <pgsql-novice(at)postgresql(dot)org>
Subject: Client-side libraries for fmgr invocation
Date: 2002-06-18 08:24:14
Message-ID: 3D0EEE2E.3D863772@cs.man.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)griffiths(at)cs(dot)man(dot)ac(dot)uk
---------------------------------

Browse pgsql-novice by date

  From Date Subject
Next Message Rory Campbell-Lange 2002-06-18 09:02:09 function/trigger problems
Previous Message Josh Berkus 2002-06-17 19:02:34 Re: Fw: (orig posted to usenet) Advice req for restricting entry values]