Re: transaction problem using cursors

Поиск
Список
Период
Сортировка
От Pit M.
Тема Re: transaction problem using cursors
Дата
Msg-id f4jil7$m7p$1@news.hub.org
обсуждение исходный текст
Ответ на Re: transaction problem using cursors  (Thomas Pundt <mlists@rp-online.de>)
Ответы Re: transaction problem using cursors  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: transaction problem using cursors  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
>
> I didn't try myself, but wrapping the whole into a PL/pgSQL function and
> using exceptions might do the work;
>
> http://www.postgresql.org/docs/8.2/static/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING
>
> Ciao,
> Thomas
>

Unfortunately this is not possible, because this should happen on the
client. The client calls FETCH for every record available in that cursor
    when the user (application) wants to display the data (scrollable
list of records)
So do you think i should wrap each FETCH statement?
We handle exceptions errors through libpq, and if a FETCH leads to such
a runtime error, we try to FETCH the first record again.
The problem is that we can't use this cursor any more -> it seems to be
corrupt after that error.

Pit

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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Functions that return both Output Parameters and recordsets
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Functions that return both Output Parameters and recordsets