pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Borg Salling <tbs@navicon.dk>
To: Bo Lorentsen <bl@netgroup.dk>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Number of rows in a cursor ?
Date: Wed, 24 Aug 2005 11:55:01 +0200
Message-ID: <430C43F5.2030506@navicon.dk> (raw)
In-Reply-To: <430C3C40.4070906@netgroup.dk>
References: <430C3C40.4070906@netgroup.dk>

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-DIAGNOSTIC...)

/Thomas.




view thread (13+ messages)  latest in thread

Message-ID: <430C43F5.2030506@navicon.dk>
Permalink:  ../430C43F5.2030506@navicon.dk/
Also on:    postgresql.org/message-id/430C43F5.2030506@navicon.dk

 · 

reply

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: tbs@navicon.dk, bl@netgroup.dk
  Subject: Re: Number of rows in a cursor ?
  In-Reply-To: <430C43F5.2030506@navicon.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