Re: Getting ROW_COUNT from MOVE in 8.3 - Mailing list pgsql-general

From Reuven M. Lerner
Subject Re: Getting ROW_COUNT from MOVE in 8.3
Date
Msg-id 4CC4942A.9080205@lerner.co.il
Whole thread Raw
In response to Re: Getting ROW_COUNT from MOVE in 8.3  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
Hi, Peter.  You wrote:

>> But is there any way for me to get, in 8.3, the
>> number of rows over which a cursor has skipped?  Keep in mind that
>> after
>> this count has executed, we're then going to rewind the cursor,
>> chunking
>> through the result set with a separate function.
> You could store the query result in a temporary table.
Yeah, that's what we're doing now.  But (a) I'm hoping that move will be
faster, because we're not copying data, but just moving through it, and
(b) I wanted to benchmark the different options.   But I'm glad to know
that this isn't a bad way to go, given the lack of information.

That said, I'm sort of surprised that the psql client is able to show us
the number of rows through which MOVE operated, while we're unable to
access that number in pl/pgsql.  But hey, that's yet another welcome
addition to 9.0...

Reuven

--
Reuven M. Lerner -- Web development, consulting, and training
Mobile: +972-54-496-8405 * US phone: 847-230-9795
Skype/AIM: reuvenlerner


pgsql-general by date:

Previous
From: "Francisco Figueiredo Jr."
Date:
Subject: Re: Windows 2008/IIS cannot connect to Postgres 9.0
Next
From: Craig Ringer
Date:
Subject: Re: Performance implications of creating many, many sequences