Re: function retuning refcursor, order by ignored?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: function retuning refcursor, order by ignored?
Дата
Msg-id 20070530165523.GI7128@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: function retuning refcursor, order by ignored?  (novnov <novnovice@gmail.com>)
Ответы Re: function retuning refcursor, order by ignored?  (novnov <novnovice@gmail.com>)
Re: function retuning refcursor, order by ignored?  (novnov <novnovice@gmail.com>)
Список pgsql-general
novnov escribió:
>
> I have been able to run a test like you have in a query (if that's the right
> term), and ORDER BY does work. When trying to run via psql, it fails, I
> can't see what I'm doing wrong. (windows xp, postgres 8.2.0-1)
>
> ups=# select proc_item_list(1,true);
>    proc_item_list
> --------------------
>  <unnamed portal 3>
> (1 row)
>
> ups=# fetch all from "<unnamed portal 3>";
> ERROR:  cursor "<unnamed portal 3>" does not exist
> ups=#

Cursors are closed when transactions finish.  Try issuing a BEGIN before
calling the function (and COMMIT after the fetch).

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

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

Предыдущее
От: Enrico Sirola
Дата:
Сообщение: table partitioning pl/pgsql helpers
Следующее
От: Oliver Elphick
Дата:
Сообщение: Problem - any password accepted