length of recordset read through a cursor - Mailing list pgsql-sql

From Knut P. Lehre
Subject length of recordset read through a cursor
Date
Msg-id 5.2.0.9.2.20030729160030.019b5ad0@uio-pop.uio.no
Whole thread Raw
List pgsql-sql
After declaring a cursor, one way of obtaining the length of the resultset 
is to perform a "MOVE 0" and read the PQcmdStatus which returns a "MOVE nn" 
where nn is the length of the resultset. (A negative MOVE can then be  used 
to allow starting to fetch records from the beginning of the resultset.)

Is there another, possibly faster way?

Thanks, K.P.Lehre



pgsql-sql by date:

Previous
From: teknokrat
Date:
Subject: converting interval to timestamp
Next
From:
Date:
Subject: Does a the block of code within a stored procedure constitute a transaction?