Re: function retuning refcursor, order by ignored?

From: novnov <novnovice(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: function retuning refcursor, order by ignored?
Date: 2007-05-30 17:55:22
Message-ID: 10879158.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Right...I see I'd left BEGIN; off after the first couple of trys.

Thanks

Alvaro Herrera-7 wrote:
>
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>
>

--
View this message in context: http://www.nabble.com/function-retuning-refcursor%2C-order-by-ignored--tf3837519.html#a10879158
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2007-05-30 17:55:42 Re: Problem - any password accepted
Previous Message Ron Johnson 2007-05-30 17:44:23 Re: Geographic data sources, queries and questions