Re: pl/python SPI in subtransactions

Поиск
Список
Период
Сортировка
От Jan Urbański
Тема Re: pl/python SPI in subtransactions
Дата
Msg-id 4D447AFC.5060406@wulczer.org
обсуждение исходный текст
Ответ на Re: pl/python SPI in subtransactions  (Steve Singer <ssinger_pg@sympatico.ca>)
Ответы Re: pl/python SPI in subtransactions  (Steve Singer <ssinger_pg@sympatico.ca>)
Список pgsql-hackers
On 29/01/11 21:27, Steve Singer wrote:
> On 11-01-27 04:33 PM, Jan Urbański wrote:
>>> I am finding the treatment of savepoints very strange.
>>> If as a function author I'm able to recover from errors then I'd expect
>>> (or maybe want) to be able to manage them through savepoints
>> Ooops, you found a bug there. In the attached patch you get the same
>> error (SPI_ERROR_TRANSACTION) as in master. Also added a unit test for
>> that.
>>
> I think you need to make the same change to PLy_spi_execute_plan.

D'oh, you're right, thanks. Attached patch with fix. Curiosly, right now
in master your example with plpy.prepare will result in "savepoint"
being swallowed, but it's of course better to react with an error.

Cheers,
Jan

Вложения

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

Предыдущее
От: Steve Singer
Дата:
Сообщение: Re: pl/python SPI in subtransactions
Следующее
От: Steve Singer
Дата:
Сообщение: Re: pl/python SPI in subtransactions