Re: Number of rows in a cursor ?

From: Thomas Borg Salling <tbs(at)navicon(dot)dk>
To: Bo Lorentsen <bl(at)netgroup(dot)dk>
Cc: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Number of rows in a cursor ?
Date: 2005-08-24 09:55:01
Message-ID: 430C43F5.2030506@navicon.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message neil.saunders 2005-08-24 10:00:54 Re: Number of rows in a cursor ?
Previous Message Bo Lorentsen 2005-08-24 09:22:08 Number of rows in a cursor ?