From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexaki Sofia <alexaki@ics.forth.gr>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: arrays as input parameter for c functions
Date: Fri, 12 Jul 2002 09:43:40 -0400
Message-ID: <9256.1026481420@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.GSO.4.33.0207121241110.7377-100000@calliope>
References: <Pine.GSO.4.33.0207121241110.7377-100000@calliope>
Alexaki Sofia <alexaki@ics.forth.gr> writes:
> I want to add a c function in PostgreSQL (7.2.1)
> Is it possible the input parametrs othe function to be
> arrays of text (i.e., text *temp[10])?
You can certainly make the function take a "text[]", but it's not
going to be spoon-fed to you as a C array; you'll need to break down
the array value yourself. See deconstruct_array. (The aggregate
support functions for numeric avg/stddev/etc might be useful examples
of interpreting and constructing arrays of varlena datums.)
regards, tom lane
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: tgl@sss.pgh.pa.us, alexaki@ics.forth.gr
Subject: Re: arrays as input parameter for c functions
In-Reply-To: <9256.1026481420@sss.pgh.pa.us>
* 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