Re: Error handling in plperl and pltcl

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error handling in plperl and pltcl
Дата
Msg-id 8421.1102103640@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error handling in plperl and pltcl  (James Robinson <jlrobins@socialserve.com>)
Список pgsql-hackers
James Robinson <jlrobins@socialserve.com> writes:
> The JDBC interface exposes the savepoint interface, via setSavepoint(), 
> releaseSavepoint(), and rollback(Savepoint sp) methods on the 
> Connection,  and Thomas's design of PL/Java offers the SPI via mapping 
> it onto JDBC. Would client-side JDBC also suffer from the same 
> potential issue of 'commit a savepoint made by a sub-function'?

No, it's not a problem for client-side JDBC, because that's executing in
a client thread that's not going to have its state affected by telling
the server to roll back some work.  The fundamental problem on the
server side is keeping rollback from wiping your execution stack and
local variables out from under you :-(.

> Or is this something SPI-specific?

AFAICS the same problem would occur whether the PL used SPI or not;
certainly bypassing SPI to use the database engine more directly
wouldn't solve it.
        regards, tom lane


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

Предыдущее
От: James Robinson
Дата:
Сообщение: Re: Error handling in plperl and pltcl
Следующее
От: Tom Lane
Дата:
Сообщение: Buildfarm coverage (was Re: OK, ready for RC1 or Beta6)