Re: cursor "x" does not exist

Поиск
Список
Период
Сортировка
От rob stone
Тема Re: cursor "x" does not exist
Дата
Msg-id 1523794523.3515.6.camel@gmail.com
обсуждение исходный текст
Ответ на cursor "x" does not exist  (Bob Jones <r.a.n.d.o.m.d.e.v.4+postgres@gmail.com>)
Список pgsql-general
Hello Bob,

On Sat, 2018-04-14 at 15:44 +0100, Bob Jones wrote:
> Hello,
> 
> 
> 
> P.S. As a side-question, if anyone here has experience in using
> Postgres as a backend to PHP, are refcursors the way to go or should
> I
> be thinking of SETOF or other return styles ?
> 


If you have a business requirement along the lines of "display all
outstanding orders for a customer" it is best to create a view that
serves that purpose. Then all you need to code is a "select * from
v_outstanding_orders where customer_id = $1";
If there are any outstanding orders you can page through the
associative array returned by the query in order to display the
results.

HTH,
Rob




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

Предыдущее
От: Ricardo Martin Gomez
Дата:
Сообщение: Re: Can a broken Postgresql data directory be reconstructed withoutlosing data?
Следующее
От: A A
Дата:
Сообщение: Re: Can a broken Postgresql data directory be reconstructed without losing data?