arrays in stored procedures - Mailing list pgsql-sql

From Dalton Shane
Subject arrays in stored procedures
Date
Msg-id 200203021638.QAA05320@cs.may.ie
Whole thread Raw
List 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';

-------------------------------------------------------------------



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: sequential joins
Next
From: "Dan Langille"
Date:
Subject: using LIMIT only on primary table