Re: stored function - array parameter - how many element in array ?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: Özgür Tuğrul <ozgur(dot)tugrul(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: stored function - array parameter - how many element in array ?
Date: 2006-07-13 13:10:52
Message-ID: b42b73150607130610p641b1431h89c5d256d51dcf69@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 7/13/06, Özgür Tuğrul <ozgur(dot)tugrul(at)gmail(dot)com> wrote:
>
> hello,
>
> the question is very clear .. when we write stored function, we can use
> array parameter as a variable .. but, in the function, how do i know how
> many element in that array ?
>
> i want to perform some dml operations about each one like (delete, update or
> delete)
>
> can anyone show me the example or tell me the function name i should use ..
>

have you looked at array_upper/array_dims? you can see an example of
array_upper here:
http://people.planetpostgresql.org/merlin/index.php?/archives/4-fun-with-arrays.html

(shameless plug) :)

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2006-07-13 13:16:00 Re: getting function argument names from psql?
Previous Message Spendius 2006-07-13 12:46:55 Trying to connect to an Oracle instance...