X-Original-To: pgsql-sql-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E98979FA425 for ; Wed, 28 Jun 2006 15:16:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 08517-04 for ; Wed, 28 Jun 2006 15:16:08 -0300 (ADT) X-Greylist: delayed 00:27:01.471032 by SQLgrey- Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 08F269FAD5A for ; Wed, 28 Jun 2006 15:16:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from presinet.com (mail.presinet.com [209.53.156.1]) by svr4.postgresql.org (Postfix) with ESMTP id 735435AF849 for ; Wed, 28 Jun 2006 17:49:03 +0000 (GMT) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 28 Jun 2006 10:48:32 -0700 Message-ID: <44A2C0EF.3@presinet.com> Date: Wed, 28 Jun 2006 10:48:31 -0700 From: Bricklen Anderson User-Agent: Thunderbird 1.5.0.4 (X11/20060615) MIME-Version: 1.0 To: KeithW@narrowpathinc.com Cc: PostgreSQL SQL Subject: Re: "CASE" is not a variable References: <20060628154728.M33440@narrowpathinc.com> <21800.1151511389@sss.pgh.pa.us> <20060628173010.M51266@narrowpathinc.com> In-Reply-To: <20060628173010.M51266@narrowpathinc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 28 Jun 2006 17:48:32.0953 (UTC) FILETIME=[12BD0290:01C69ADB] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/301 X-Sequence-Number: 25537 Keith Worthington wrote: >>> "Keith Worthington" writes: >>> The following is a section of code inside an SQL function. >> On Wed, 28 Jun 2006 12:16:29 -0400, Tom Lane wrote >> SQL, or plpgsql? It looks to me like misuse of the plpgsql INTO clause >> (there can be only one). >> >> regards, tom lane > > plpgsql > > This is part of a function inside a v8.0.2 database. > > I didn't realize that the INTO clause was only limited to one instance. I was > trying to accomplish > > SELECT col_a INTO var1, > col_b INTO var2, > col_c INTO var3, > ... > FROM foo > WHERE fobar; > > Kind Regards, > Keith try it like select col_a,col_b,col_c INTO va1,var2,var3 .... not sure if 8.0.2 allows you to do that, however.