pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John DeSoi <desoi@pgedit.com>
To: Bo Lorentsen <bl@netgroup.dk>
Cc: neil.saunders@accenture.com
Cc: pgsql-sql@postgresql.org
Subject: Re: Number of rows in a cursor ?
Date: Wed, 24 Aug 2005 08:08:22 -0400
Message-ID: <69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com> (raw)
In-Reply-To: <430C4C70.2010005@netgroup.dk>
References: <B74B7433CDDD2C4AA41D94832E32E19D92EE9A@EMEXM1112.dir.svc.accenture.com>
	<430C4C70.2010005@netgroup.dk>


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




view thread (13+ messages)  latest in thread

Message-ID: <69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com>
Permalink:  ../69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com/
Also on:    postgresql.org/message-id/69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: desoi@pgedit.com, bl@netgroup.dk, neil.saunders@accenture.com
  Subject: Re: Number of rows in a cursor ?
  In-Reply-To: <69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox