Re: SPI_prepare and error recovery

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SPI_prepare and error recovery
Дата
Msg-id 19071.1074554092@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SPI_prepare and error recovery  ("Thomas Hallgren" <thhal@mailblocks.com>)
Список pgsql-hackers
"Thomas Hallgren" <thhal@mailblocks.com> writes:
> My question is, at the point of /* Handle error here */, how do I get hold
> of the error information?

You don't.  The above coding technique is entirely unsafe anyway,
because it relies on the assumption that the system is still in a good
state to continue the transaction, which is in general not true.

If we had nested-transaction support you could arrange for an inner
transaction around the thing you want to retry; but we don't, and this
problem of cleaning up after an error is one of the biggest reasons
why not.
        regards, tom lane


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

Предыдущее
От: "Thomas Hallgren"
Дата:
Сообщение: SPI_prepare and error recovery
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Old binary packages.