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

From Thomas Borg Salling
Subject Re: Number of rows in a cursor ?
Date
Msg-id 430C43F5.2030506@navicon.dk
Whole thread Raw
In response to Number of rows in a cursor ?  (Bo Lorentsen <bl@netgroup.dk>)
Responses Re: Number of rows in a cursor ?  (Bo Lorentsen <bl@netgroup.dk>)
List pgsql-sql
Bo Lorentsen wrote:

> Is it possible to get the total number of rows found in a cursor, or 
> must I make a count(*) and then a select ?

Perhaps:
GET DIAGNOSTICS rc = ROW_COUNT;

(see http://archives.postgresql.org/pgsql-novice/2003-06/msg00143.php 
and 
http://www.postgresql.org/docs/8.0/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS)

/Thomas.



pgsql-sql by date:

Previous
From: Bo Lorentsen
Date:
Subject: Number of rows in a cursor ?
Next
From: Szűcs Gábor
Date:
Subject: Re: Tuple insert missing query in ongoing transaction