Re: Counting rows in a PL/PgSQL CURSOR without fetching? - Mailing list pgsql-general

From Tom Lane
Subject Re: Counting rows in a PL/PgSQL CURSOR without fetching?
Date
Msg-id 9193.1222364571@sss.pgh.pa.us
Whole thread Raw
In response to Counting rows in a PL/PgSQL CURSOR without fetching?  (Reg Me Please <regmeplease@gmail.com>)
List pgsql-general
Reg Me Please <regmeplease@gmail.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

pgsql-general by date:

Previous
From: "Dmitry Koterov"
Date:
Subject: Indirect access to NEW or OLD records
Next
From: "Pavel Stehule"
Date:
Subject: Re: Dynamically created cursors vanish in PLPgSQL