Re: [subxacts] Aborting a function

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [subxacts] Aborting a function
Дата
Msg-id 20040708210851.GA11278@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: [subxacts] Aborting a function  (Rod Taylor <pg@rbt.ca>)
Ответы Re: [subxacts] Aborting a function
Список pgsql-hackers
On Thu, Jul 08, 2004 at 04:52:04PM -0400, Rod Taylor wrote:
> > create function crashme2() returns int strict language plpgsql as '
> > begin
> >    subbegin;
> >       select foo;         -- aborts the transaction
> >                           -- did not close the subxact
> > end;';
> 
> I'm not sure I follow. Are you saying that the following code or
> something similar will never work?

Right.  The problem is that plpgsql stops executing code as soon as an
error is found; the control returns to the main loop by way of a longjmp
in the error reporting mechanism.

I was quite dissappointed, as you will undoubtly be, when I found this
out :-(

Some sort of modification will be needed to the error processing
mechanism, but this is beyond me at this point ...  I don't have any
idea how could this be.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
Licensee shall have no right to use the Licensed Software
for productive or commercial use. (Licencia de StarOffice 6.0 beta)


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

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Re: [subxacts] Aborting a function
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: User Quota Implementation