X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.192]) by svr1.postgresql.org (Postfix) with ESMTP id 6B6CFCBB94 for ; Thu, 17 Jul 2003 18:18:15 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (svr4.postgresql.org [64.117.224.192]) (amavisd-new, port 10024) with ESMTP id 18538-05 for ; Thu, 17 Jul 2003 18:18:44 +0000 (GMT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2C9CCCC1A7 for ; Thu, 17 Jul 2003 15:18:14 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h6HIIgQ3005659; Thu, 17 Jul 2003 14:18:42 -0400 (EDT) To: "Donald Fraser" Cc: "[ADMIN]" Subject: Re: Arrays in pl/pgsql functions In-reply-to: <005701c34c55$8d017540$1664a8c0@DEMOLITION> References: <005701c34c55$8d017540$1664a8c0@DEMOLITION> Comments: In-reply-to "Donald Fraser" message dated "Thu, 17 Jul 2003 12:21:16 +0100" Date: Thu, 17 Jul 2003 14:18:42 -0400 Message-ID: <5658.1058465922@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/153 X-Sequence-Number: 9493 "Donald Fraser" writes: > CREATE OR REPLACE FUNCTION test_arrays() RETURNS int4[] AS ' > DECLARE > test int4[]; > BEGIN > test[1] := 1; > RETURN test; > END ' LANGUAGE 'plpgsql'; > If I try to execute this function I get: > WARNING: plpgsql: ERROR during compile of test_arrays near line 5 > ERROR: syntax error at or near "[" Existing releases of plpgsql don't support assignment to array elements. I believe Joe Conway has fixed this for 7.4, though. regards, tom lane