Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5AB57633662 for ; Tue, 7 Apr 2009 16:32:03 -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 10358-03 for ; Tue, 7 Apr 2009 16:31:58 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id BE94D632E2F for ; Tue, 7 Apr 2009 16:32:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n37JVtNL020205; Tue, 7 Apr 2009 15:31:55 -0400 (EDT) To: Merlin Moncure cc: Matthew Wakeling , pgsql-performance@postgresql.org Subject: Re: plpgsql arrays In-reply-to: References: <28757.1238767715@sss.pgh.pa.us> Comments: In-reply-to Merlin Moncure message dated "Tue, 07 Apr 2009 15:24:23 -0400" Date: Tue, 07 Apr 2009 15:31:55 -0400 Message-ID: <20204.1239132715@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.13 tagged_above=0 required=5 tests=AWL=0.130 X-Spam-Level: X-Archive-Number: 200904/149 X-Sequence-Number: 33516 Merlin Moncure writes: > On Tue, Apr 7, 2009 at 11:18 AM, 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; > according to the docs, > http://www.postgresql.org/docs/8.3/interactive/plpgsql-cursors.html#PLPGSQL-CURSOR-USING Subsequent discussion showed that the problem was Matthew hadn't found that page. I guess that at least the DECLARE CURSOR reference page ought to have something like "if you are trying to use cursors in plpgsql, see ". Matthew, where *were* you looking exactly? regards, tom lane