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 4E50DD6FBB for ; Wed, 24 Aug 2005 09:08:43 -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 97777-01 for ; Wed, 24 Aug 2005 12:08:41 +0000 (GMT) Received: from a2s4.a2hosting.com (a2s4.a2hosting.com [64.9.205.220]) by svr1.postgresql.org (Postfix) with ESMTP id 85DBDD6D8F for ; Wed, 24 Aug 2005 09:08:39 -0300 (ADT) Received: from user-1120fe1.dsl.mindspring.com ([66.32.61.193] helo=[192.168.1.10]) by a2s4.a2hosting.com with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.52) id 1E7u3d-0004S1-Vd; Wed, 24 Aug 2005 08:08:42 -0400 In-Reply-To: <430C4C70.2010005@netgroup.dk> References: <430C4C70.2010005@netgroup.dk> Mime-Version: 1.0 (Apple Message framework v733) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com> Cc: neil.saunders@accenture.com, pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: John DeSoi Subject: Re: Number of rows in a cursor ? Date: Wed, 24 Aug 2005 08:08:22 -0400 To: Bo Lorentsen X-Mailer: Apple Mail (2.733) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - a2s4.a2hosting.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - pgedit.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200508/220 X-Sequence-Number: 22448 On Aug 24, 2005, at 6:31 AM, Bo Lorentsen wrote: > How sad, then I have to repeat the query, first for counting and > last for data fetch :-( No, you can use the MOVE command and read how many rows you moved with something like MOVE LAST IN mycursor; http://www.postgresql.org/docs/8.0/interactive/sql-move.html John DeSoi, Ph.D. http://pgedit.com/ Power Tools for PostgreSQL