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

Re: arrays as input parameter for c functions

From: Alexaki Sofia <alexaki(at)ics(dot)forth(dot)gr>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: arrays as input parameter for c functions
Date: 2002-07-12 14:32:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
thank you for your answer.

Could you tell me how such a function is it called?

Let's say that the function is test(text[])
how can I call this function from a sql command, i.e., what
will be teh value of the input parameters?

select test(?????????)


On Fri, 12 Jul 2002, Tom Lane wrote:

> Alexaki Sofia <alexaki(at)ics(dot)forth(dot)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

In response to


pgsql-interfaces by date

Next:From: Jim ParkerDate: 2002-07-12 14:45:06
Subject: Re: ECPG Questions
Previous:From: Thomas LockhartDate: 2002-07-12 14:25:00
Subject: Re: Can I have multiple cursors open ...

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