From: Dalton Shane <se401029@cs.may.ie>
To: pgsql-sql@postgresql.org
Subject: arrays in stored procedures
Date: Sat, 2 Mar 2002 16:42:33 +0000 (GMT)
Message-ID: <200203021638.QAA05320@cs.may.ie> (raw)
Thank you for all your help before this. There was some problem with the server
and my post got sent three or four times, strange times are upon us.
Anyway I would like to use arrays in a stored procedure I'm writing and the
compiler doesn't seem to like it.
Are arrays supported in PL/Psql?
How would one find the length of an array?
What I am trying to do is run a select which will return 5 values, which are
then stuck into an array........................but I can't get it working.
If anybody has any ideas, I would be very grateful
Below is the simplest thing I can think of for an array and yet it won't work.
I've read the documentation but it doesn't say anything about arrays and stored
procedures
Thanks
Shane.
---------------------------------------------------------------
drop function collie();
CREATE FUNCTION collie() RETURNS integer AS '
DECLARE
rooskey integer[];
shane integer;
BEGIN
shane := rooskey[1] = {23};
RETURN shane;
END;
' LANGUAGE 'plpgsql';
-------------------------------------------------------------------
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: se401029@cs.may.ie
Subject: Re: arrays in stored procedures
In-Reply-To: <200203021638.QAA05320@cs.may.ie>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox