Received: from cs.may.ie (l3ult25.cs.may.ie [149.157.246.225]) by postgresql.org (Postfix) with ESMTP id AA070475943 for ; Sat, 2 Mar 2002 11:44:06 -0500 (EST) Received: from l2sol29 (l2sol29 [149.157.244.139]) by cs.may.ie (8.9.3/8.9.1) with SMTP id QAA05320 for ; Sat, 2 Mar 2002 16:38:39 GMT Message-Id: <200203021638.QAA05320@cs.may.ie> Date: Sat, 2 Mar 2002 16:42:33 +0000 (GMT) From: Dalton Shane Reply-To: Dalton Shane Subject: arrays in stored procedures To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: Hmg+ods7JqrAzvLvY2+sAw== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.2 SunOS 5.7 i86pc i386 X-Archive-Number: 200203/18 X-Sequence-Number: 6900 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'; -------------------------------------------------------------------