Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
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

#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,

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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group