Re: refcursor error 55000

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Karen Hill" <karen_hill22(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: refcursor error 55000
Date: 2006-10-08 20:48:48
Message-ID: 10873.1160340528@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Karen Hill" <karen_hill22(at)yahoo(dot)com> writes:
> I get an error message 55000 when I try to traverse backwards in an
> refcursor. Works fine going forward. The hint says I need to use
> scroll. What is the syntax for using scroll in a stored procedure that
> returns an refcursor? Or do refcursors only support traversing forward?

AFAICS the SPI cursor code only supports the old "backward compatible"
behavior, which is that you can do backward scans only if the query plan
supports them as-is. You might be able to force this by adding an ORDER
BY to the query to force a top-level sort.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2006-10-09 02:53:43 Re: PL/SQL: function call like $1($2)
Previous Message Karen Hill 2006-10-08 19:24:46 refcursor error 55000