passing array as argument and returning an array in plpgsql - Mailing list pgsql-general

From K. Deepa
Subject passing array as argument and returning an array in plpgsql
Date
Msg-id 60985.192.168.1.154.1071573939.squirrel@daisy.midascomm.com
Whole thread Raw
Responses Re: passing array as argument and returning an array in
Re: passing array as argument and returning an array in
List pgsql-general
Hi all,
       I am using postgresql7.4. How to handle arrays in plpgsql. How can
I pass an array. Is it possible to retrieve values from an array by
indexing it like

argument : '{1,2,3}'
Return value : varchar array

Variables :
---------

a alias for $1
b _varchar

Usage :
-----

b[1] = a[1];
b[2] = a[2];

return b;

Is it possible.

TIA,

--
regards,
Deepa K



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Changing user
Next
From: Kris Jurka
Date:
Subject: Re: UTF support in WIN32 native and Lower/Upper in 7.5