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 34ACCD6ECE for ; Wed, 24 Aug 2005 08:36:22 -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 01260-09 for ; Wed, 24 Aug 2005 11:36:18 +0000 (GMT) Received: from hotmail.com (bay103-dav7.bay103.hotmail.com [65.54.174.79]) by svr1.postgresql.org (Postfix) with ESMTP id A7CDDD6F4F for ; Wed, 24 Aug 2005 08:36:16 -0300 (ADT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 24 Aug 2005 04:36:20 -0700 Message-ID: Received: from 65.54.174.200 by BAY103-DAV7.phx.gbl with DAV; Wed, 24 Aug 2005 11:36:20 +0000 X-Originating-IP: [65.54.174.200] X-Originating-Email: [russellsimpkins@hotmail.com] X-Sender: russellsimpkins@hotmail.com From: "Russell Simpkins" To: "Bo Lorentsen" Cc: References: <430C4C70.2010005@netgroup.dk> Subject: Re: Number of rows in a cursor ? Date: Wed, 24 Aug 2005 07:36:29 -0400 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-OriginalArrivalTime: 24 Aug 2005 11:36:20.0374 (UTC) FILETIME=[0C40E360:01C5A8A0] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.867 required=5 tests=[AWL=-1.920, DNS_FROM_RFC_ABUSE=0.374, DNS_FROM_RFC_POST=1.376, FORGED_MUA_OUTLOOK=3.037, MSGID_FROM_MTA_HEADER=0] X-Spam-Level: ** X-Archive-Number: 200508/217 X-Sequence-Number: 22445 > neil.saunders@accenture.com wrote: > >>You cannot count the number of rows in a cursor, unfortunately. I recently >>ran in to this problem. >> > How sad, then I have to repeat the query, first for counting and last for > data fetch :-( > > /BL > If you need a count, why not just execute one of the methods to get a count. i.e.e select count(id) ...