Re: arrays as input parameter for c functions - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: arrays as input parameter for c functions
Date
Msg-id 9256.1026481420@sss.pgh.pa.us
Whole thread Raw
In response to arrays as input parameter for c functions  (Alexaki Sofia <alexaki@ics.forth.gr>)
Responses Re: arrays as input parameter for c functions
List pgsql-interfaces
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


pgsql-interfaces by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Wish List: Client access to NUMERIC/DECIMAL type functions
Next
From: "Warren W. Gay VE3WWG"
Date:
Subject: Re: Wish List: Client access to NUMERIC/DECIMAL type functions