From: | Dalton Shane <se401029(at)cs(dot)may(dot)ie> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | arrays in stored procedures |
Date: | 2002-03-02 16:42:33 |
Message-ID: | 200203021638.QAA05320@cs.may.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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';
-------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Dan Langille | 2002-03-02 22:35:31 | using LIMIT only on primary table |
Previous Message | Oleg Lebedev | 2002-03-01 23:47:15 | Re: sequential joins |