X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5E42EDA212 for ; Wed, 5 Oct 2005 12:43:21 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13198-08 for ; Wed, 5 Oct 2005 15:43:18 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 23A6DDA1FA for ; Wed, 5 Oct 2005 12:43:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j95Fh4uE019177; Wed, 5 Oct 2005 11:43:04 -0400 (EDT) To: Richard Huxton Cc: andrew@pillette.com, pgsql-sql@postgresql.org Subject: Re: MOVE in SQL vs PLPGSQL In-reply-to: <4343EABB.6030808@archonet.com> References: <200510051417.j95EH0518161@pillette.com> <4343EABB.6030808@archonet.com> Comments: In-reply-to Richard Huxton message dated "Wed, 05 Oct 2005 16:01:15 +0100" Date: Wed, 05 Oct 2005 11:43:04 -0400 Message-ID: <19176.1128526984@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/38 X-Sequence-Number: 22891 Richard Huxton writes: > Ah, now I see what you're saying. You're quite right in your suspicions, > "MOVE..." isn't supported for plpgsql cursors. You could probably do > something with EXECUTE and returning a refcursor from a previous > function, but that sounds fiddly. > I must admit, on the odd occasion I want to skip a row, I just FETCH it > and move on. Anyone else? There is something on the TODO list about improving plpgsql's cursor functionality --- there's no reason it shouldn't have MOVE, except that no one got around to it yet. regards, tom lane