Re: why does plperl cache functions using just a bool for is_trigger

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why does plperl cache functions using just a bool for is_trigger
Дата
Msg-id 4262.1288878581@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: why does plperl cache functions using just a bool for is_trigger  (Hannu Krosing <hannu@2ndQuadrant.com>)
Список pgsql-hackers
Hannu Krosing <hannu@2ndQuadrant.com> writes:
> Are you sure that having each try/except use a subtransaction is the
> right way to do it ?

Actually it is not: what you have to do is use a subtransaction in the
plpy.execute() operation, so that if the called SQL operation fails, you
can clean it up and then report the error to Python as if it were any
other Python error.  Messing with the host language's exception handling
is a sure route to misery.  plperl and pltcl both contain examples of
doing this properly.
        regards, tom lane


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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: contrib: auth_delay module
Следующее
От: KaiGai Kohei
Дата:
Сообщение: Re: contrib: auth_delay module