Re: Counting rows in a PL/PgSQL CURSOR without fetching?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Reg Me Please <regmeplease(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Counting rows in a PL/PgSQL CURSOR without fetching?
Date: 2008-09-25 17:42:51
Message-ID: 9193.1222364571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Reg Me Please <regmeplease(at)gmail(dot)com> writes:
> Unuckily
> MOVE LAST FROM curs1;
> won't work with
> GET DIAGNOSTICS cnt = ROW_COUNT;

Hmm, you're right that MOVE doesn't set row_count (because plpgsql
itself isn't fetching the rows), but it kinda seems like it should.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2008-09-25 17:58:07 Re: Dynamically created cursors vanish in PLPgSQL
Previous Message Dmitry Koterov 2008-09-25 17:42:45 Indirect access to NEW or OLD records