Re: Vote totals for SET in aborted transaction

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Vote totals for SET in aborted transaction
Дата
Msg-id 23988.1020094235@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Vote totals for SET in aborted transaction  (Scott Marlowe <scott.marlowe@ihs.com>)
Ответы Re: Vote totals for SET in aborted transaction  (Hannu Krosing <hannu@tm.ee>)
Re: Vote totals for SET in aborted transaction  ("Marc G. Fournier" <scrappy@hub.org>)
Список pgsql-hackers
Scott Marlowe <scott.marlowe@ihs.com> writes:
> I've been thinking this over and over, and it seems to me, that the way 
> SETS in transactions SHOULD work is that they are all rolled back, period, 
> whether the transaction successfully completes OR NOT.

This would make it impossible for SET to have any persistent effect
at all.  (Every SQL command is inside a transaction --- an
implicitly-established one if necesary, but there is one.)

It might well be useful to have some kind of LOCAL SET command that
behaves the way you describe (effects good only for current transaction
block), but I don't think it follows that that should be the only
behavior available.

What would you expect if LOCAL SET were followed by SET on the same
variable in the same transaction?  Presumably the LOCAL SET would then
be nullified; or is this an error condition?
        regards, tom lane


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

Предыдущее
От: Thomas Lockhart
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Vote totals for SET in aborted transaction