Re: Vote totals for SET in aborted transaction

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Vote totals for SET in aborted transaction
Дата
Msg-id 29764.1020100192@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Vote totals for SET in aborted transaction  (Hannu Krosing <hannu@tm.ee>)
Список pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> And I also think that this will solve the original issue, which iirc was
> rolling back SET TIMEOUT at ABORT.

It does provide a way to deal with that problem.  But we still have the
example of
begin;create schema foo;set search_path = foo;rollback;

to mandate changing the behavior of plain SET to roll back on error.

> If we have LOCAL SET, there is no need to have any other mechanism for
> ROLLING BACK/COMMITing SET's - SET and DML can be kept totally separate,
> as they should be based on fact that SET does not directly affect data.

That can only work if you have no connection at all between SETs and
data that is in the database; which seems to me to be a rather large
restriction on what SET can be used for.  (In particular, search_path
couldn't be treated as a SET variable at all; we'd have to invent some
other specialized command for it.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction