Re: Fun with Cursors- how to rewind a cursor - Mailing list pgsql-general

From Tom Lane
Subject Re: Fun with Cursors- how to rewind a cursor
Date
Msg-id 28067.1172797492@sss.pgh.pa.us
Whole thread Raw
In response to Fun with Cursors- how to rewind a cursor  ("Postgres User" <postgres.developer@gmail.com>)
Responses Re: Fun with Cursors- how to rewind a cursor
List pgsql-general
"Postgres User" <postgres.developer@gmail.com> writes:
> Is there any way to 'rewind' the cursor to the first row?

plpgsql doesn't have any command for that (though I think someone is
working on improving its cursor command set).  You should be able to
work around it by EXECUTE'ing a MOVE BACKWARD ALL command, though.
You just need to know the real name of the cursor --- see 'Returning
Cursors' in the plpgsql docs for discussion.

            regards, tom lane

pgsql-general by date:

Previous
From: Demian Lessa
Date:
Subject: Constraint validation
Next
From: Tom Lane
Date:
Subject: Re: Constraint validation