From: Bo Lorentsen <bl@netgroup.dk>
To: Thomas Borg Salling <tbs@navicon.dk>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Number of rows in a cursor ?
Date: Wed, 24 Aug 2005 12:27:11 +0200
Message-ID: <430C4B7F.4030907@netgroup.dk> (raw)
In-Reply-To: <430C43F5.2030506@navicon.dk>
References: <430C3C40.4070906@netgroup.dk>
<430C43F5.2030506@navicon.dk>
Thomas Borg Salling wrote:
> 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;
Ok, and when I use the C interface the "DECLARE .." function will return
the row count ?
Can I use PQntuples( res ) after the "DECLARE CURSOR" statement (if so,
it don't work for me :-)) ?
/BL
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: bl@netgroup.dk, tbs@navicon.dk
Subject: Re: Number of rows in a cursor ?
In-Reply-To: <430C4B7F.4030907@netgroup.dk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox