Re: 'SET LOCAL ROLE blah;' doesn't work?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 'SET LOCAL ROLE blah;' doesn't work?
Дата
Msg-id 3368.1183085360@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 'SET LOCAL ROLE blah;' doesn't work?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-bugs
Stephen Frost <sfrost@snowman.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

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: 'SET LOCAL ROLE blah;' doesn't work?
Следующее
От: David Boesch
Дата:
Сообщение: Re: BUG #3417: Foreign key constraint violation occurs unexpectedly