Re: Vote totals for SET in aborted transaction - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Vote totals for SET in aborted transaction
Date
Msg-id 29764.1020100192@sss.pgh.pa.us
Whole thread Raw
In response to Re: Vote totals for SET in aborted transaction  (Hannu Krosing <hannu@tm.ee>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Vote totals for SET in aborted transaction
Next
From: Doug McNaught
Date:
Subject: Re: Vote totals for SET in aborted transaction