Re: Getting ROW_COUNT from MOVE in 8.3

From: "Reuven M(dot) Lerner" <reuven(at)lerner(dot)co(dot)il>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting ROW_COUNT from MOVE in 8.3
Date: 2010-10-24 20:16:42
Message-ID: 4CC4942A.9080205@lerner.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-10-25 02:31:20 Re: Performance implications of creating many, many sequences
Previous Message Francisco Figueiredo Jr. 2010-10-24 19:45:49 Re: Windows 2008/IIS cannot connect to Postgres 9.0