Re: Fun with Cursors- how to rewind a cursor

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Postgres User" <postgres(dot)developer(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Fun with Cursors- how to rewind a cursor
Date: 2007-03-02 05:33:44
Message-ID: 1646.1172813624@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

"Postgres User" <postgres(dot)developer(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Postgres User 2007-03-02 06:04:05 Re: Fun with Cursors- how to rewind a cursor
Previous Message Eddy D. Sanchez 2007-03-02 05:12:06 Re: Add items to a record variable

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-03-02 06:02:41 Re: broken doc
Previous Message Tatsuo Ishii 2007-03-02 05:32:42 broken doc