From: Lonnie Cumberland <lonnie_cumberland@yahoo.com>
To: pgsql-interfaces@postgresql.org
Subject: making data types
Date: Mon, 16 Apr 2001 05:21:17 -0700 (PDT)
Message-ID: <20010416122117.82328.qmail@web12501.mail.yahoo.com> (raw)
Hello All,
Well, things are starting to make sense and come together slowly as I keep
getting a better feel for using PostgreSQL and the extension interfacing in
"C".
I am now wondering if someone could please explain to me how to make a new data
type that I can use in my "C" functions and return to the calling PL/pgSQL
function.
for example in "C" I might have something like:
typedef struct dataset
{
char one[20];
char two[30];
} dataset;
then I could easily have:
dataset *work_on_data_set(text *invalue1, int4 invalue2)
{
dataset *somedataset;
.
.
.
return somedataset;
}
My question is how to declare "dataset" so that both the "C" and PL/pgSQL can
see the same structure (type)?
Can anyone please clear this up?
Lonnie
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: lonnie_cumberland@yahoo.com
Subject: Re: making data types
In-Reply-To: <20010416122117.82328.qmail@web12501.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox