passing array as argument and returning an array in plpgsql

From: "K(dot) Deepa" <kdeepa(at)midascomm(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: passing array as argument and returning an array in plpgsql
Date: 2003-12-16 11:25:39
Message-ID: 60985.192.168.1.154.1071573939.squirrel@daisy.midascomm.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kris Jurka 2003-12-16 11:34:57 Re: UTF support in WIN32 native and Lower/Upper in 7.5
Previous Message Richard Huxton 2003-12-16 10:54:25 Re: Changing user