Search Postgresql Archives

Re: Fun with Cursors- how to rewind a cursor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I had tried several variations of MOVE Backward inside an Execute
statement earlier.  And now, I'm seeing this error appear again:

ERROR: 0A000: cannot manipulate cursors directly in PL/pgSQL

I updated the Postgres function below with this replacement line:
Execute 'MOVE Backward All In c_entry';

Any other thoughts?


On 3/1/07, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
"Postgres User" <postgres.developer@xxxxxxxxx> writes:
> So I added the following code:

> <before opening cursor>     ref_entry = 'c_entry';
> <after looping thru cursor>  MOVE Backward All In c_entry;

You have to use EXECUTE for the latter.

                       regards, tom lane



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux