From: Tom Lane <tgl@sss.pgh.pa.us>
To: typea@l-i-e.com
Cc: pgsql-performance@postgresql.org
Subject: Re: Cursor rowcount
Date: Mon, 13 Jan 2003 17:22:10 -0500
Message-ID: <6429.1042496530@sss.pgh.pa.us> (raw)
In-Reply-To: <49456.216.80.95.13.1042493599.squirrel@www.l-i-e.com>
References: <49456.216.80.95.13.1042493599.squirrel@www.l-i-e.com>
<typea@l-i-e.com> writes:
> I'm not finding any way in the docs of asking a cursor how many rows total
> are in the result set, even if I do "move 1000000 in foo", knowing a
> priori that 1000000 is far more than could be returned.
regression=# begin;
BEGIN
regression=# declare c cursor for select * from int8_tbl;
DECLARE CURSOR
regression=# move all in c;
MOVE 5 <-----------------------
regression=# end;
COMMIT
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, typea@l-i-e.com
Subject: Re: Cursor rowcount
In-Reply-To: <6429.1042496530@sss.pgh.pa.us>
References: <49456.216.80.95.13.1042493599.squirrel@www.l-i-e.com> <6429.1042496530@sss.pgh.pa.us>
* 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