Re: Number of rows in a cursor ?

From: "Russell Simpkins" <russellsimpkins(at)hotmail(dot)com>
To: "Bo Lorentsen" <bl(at)netgroup(dot)dk>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Number of rows in a cursor ?
Date: 2005-08-24 11:36:29
Message-ID: BAY103-DAV72BF461390EA073012267B5A80@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> neil(dot)saunders(at)accenture(dot)com wrote:
>
>>You cannot count the number of rows in a cursor, unfortunately. I recently
>>ran in to this problem.
>>
> How sad, then I have to repeat the query, first for counting and last for
> data fetch :-(
>
> /BL
>

If you need a count, why not just execute one of the methods to get a count.
i.e.e select count(id) ...

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Russell Simpkins 2005-08-24 11:37:30 Re: SQLException - SET AUTOCOMMIT TO OFF is no longer supported
Previous Message Dinesh Pandey 2005-08-24 11:22:27 Re: SQLException - SET AUTOCOMMIT TO OFF is no longer supported