Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4D2FA633937 for ; Tue, 7 Apr 2009 12:24:04 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 55107-06 for ; Tue, 7 Apr 2009 12:24:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.emproshunts.com (mail.emproshunts.com [66.64.191.19]) by mail.postgresql.org (Postfix) with ESMTP id BB1B06336AD for ; Tue, 7 Apr 2009 12:24:02 -0300 (ADT) Received: from [192.168.1.40] by mail.emproshunts.com (GMS 15.02.3689/KX5895.00.ca608199) with ESMTP id thcikaaa for pgsql-performance@postgresql.org; Tue, 7 Apr 2009 11:23:52 -0400 Message-ID: <49DB700F.8020108@emproshunts.com> Date: Tue, 07 Apr 2009 11:23:59 -0400 From: justin User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Matthew Wakeling CC: Tom Lane , pgsql-performance@postgresql.org Subject: Re: plpgsql arrays References: <28757.1238767715@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.1.40] X-DNSBL: 0 X-AntiSpam: Checked for restricted content by Gordano's AntiSpam Software X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.402 tagged_above=0 required=5 tests=AWL=0.402 X-Spam-Level: X-Archive-Number: 200904/140 X-Sequence-Number: 33507 Matthew Wakeling wrote: > What would be the syntax for putting a single row from a cursor into a > variable? I have tried: > > FETCH INTO left left_cursor; > > which says syntax error, and > > left = FETCH left_cursor; > > which gives the error 'ERROR: missing datatype declaration at or near > "="' > > Matthew > Have to declare Left variable as record data type declaration part of the function