Re: Number of rows in a cursor ?

From: Bo Lorentsen <bl(at)netgroup(dot)dk>
To: Thomas Borg Salling <tbs(at)navicon(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 10:27:11
Message-ID: 430C4B7F.4030907@netgroup.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Bo Lorentsen 2005-08-24 10:31:12 Re: Number of rows in a cursor ?
Previous Message Szűcs Gábor 2005-08-24 10:03:14 Re: Tuple insert missing query in ongoing transaction