Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> So actually, ON_ERROR_ROLLBACK breaks *any* use of SET LOCAL, not just
>> ROLE. Not sure that this is fixable :-(
> That's not the behavior which is intended though, is it? SET LOCAL
> should be for an entire transaction, not for subtransactions/savepoints.
No, it's supposed to be per subtransaction. Or at least that's the
interpretation we put on it when we made subtransactions; I fear it's
too late to change that now, even if there were a good argument to.
> Additionally, as I mentioned before, we should really make it clear that
> 'reset all' doesn't apply to roles. The reason I bring it up is that,
> in at least the PG PHP driver, when using persistant connections it's
> expected that a 'reset all' handles cleaning things up entirely between
> page loads, and that's not the case for roles.
That assumption is broken anyway. As of 8.3 there's a DISCARD ALL
command that actually does a full cleanup of connection-local state.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: Alvaro Herrera||Date: 2007-06-29 02:52:31|
|Subject: Re: AutoVacuum Behaviour Question|
|Previous:||From: Bruce Momjian||Date: 2007-06-29 02:41:14|
|Subject: Re: write past chunk end in ExprContext / to_char|
pgsql-bugs by date
|Next:||From: David Boesch||Date: 2007-06-29 12:43:36|
|Subject: Re: BUG #3417: Foreign key constraint violation occursunexpectedly|
|Previous:||From: Stephen Frost||Date: 2007-06-29 02:28:04|
|Subject: Re: 'SET LOCAL ROLE blah;' doesn't work?|