Re: refcursor error 55000

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: refcursor error 55000
Дата
Msg-id 10873.1160340528@sss.pgh.pa.us
обсуждение исходный текст
Ответ на refcursor error 55000  ("Karen Hill" <karen_hill22@yahoo.com>)
Список pgsql-general
"Karen Hill" <karen_hill22@yahoo.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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Karen Hill"
Дата:
Сообщение: refcursor error 55000
Следующее
От: David Fetter
Дата:
Сообщение: Re: PL/SQL: function call like $1($2)