X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 091D69DC833 for ; Thu, 29 Dec 2005 14:23:38 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 72586-06 for ; Thu, 29 Dec 2005 14:23:37 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from anu.ie (mail.anu.net [213.247.49.236]) by postgresql.org (Postfix) with ESMTP id 7E9569DC840 for ; Thu, 29 Dec 2005 14:23:35 -0400 (AST) Received: from kenxp (68.40.184.254) by anu.ie with ESMTP (Eudora Internet Mail Server X 3.2.8b1); Thu, 29 Dec 2005 18:23:35 +0000 From: "Ken Winter" To: "'Bricklen Anderson'" Cc: "'PostgreSQL pg-sql list'" Subject: Re: Arrays in PL/pgSQL routines? Date: Thu, 29 Dec 2005 13:23:28 -0500 Message-ID: <005a01c60ca4$f79e3bb0$6603a8c0@kenxp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: <43B42273.9030602@presinet.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.053 required=5 tests=[AWL=0.053] X-Spam-Score: 0.053 X-Spam-Level: X-Archive-Number: 200512/244 X-Sequence-Number: 23786 Bricklen ~ That works. (Odd that the initialization seems to be necessary to make it work.) Thanks! Yes, I'm using version 7.4. ~ Ken > -----Original Message----- > From: Bricklen Anderson [mailto:banderson@presinet.com] > Sent: Thursday, December 29, 2005 12:53 PM > To: Ken Winter > Cc: PostgreSQL pg-sql list > Subject: Re: [SQL] Arrays in PL/pgSQL routines? > > Ken Winter wrote: > > Can arrays be declared in PL/pgSQL routines? If so, how? > > > > > DECLARE > > > try: > my_array VARCHAR[] := '{}'; > > not sure if this works in 7.4 though, if that's the version that you are > using.