Re: Number of rows in a cursor ? - Mailing list pgsql-sql

From John DeSoi
Subject Re: Number of rows in a cursor ?
Date
Msg-id 69553BE2-F542-421E-8755-2895CB0F1F6C@pgedit.com
Whole thread Raw
In response to Re: Number of rows in a cursor ?  (Bo Lorentsen <bl@netgroup.dk>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: "Russell Simpkins"
Date:
Subject: Re: SQLException - SET AUTOCOMMIT TO OFF is no longer supported
Next
From: "Joel Fradkin"
Date:
Subject: Re: SQLException - SET AUTOCOMMIT TO OFF is no longer supported