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

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: 'SET LOCAL ROLE blah;' doesn't work?
Дата
Msg-id 20070628211037.GP7531@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: 'SET LOCAL ROLE blah;' doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: 'SET LOCAL ROLE blah;' doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> >   At http://www.postgresql.org/docs/8.2/static/sql-set-role.html, we
> >   claim that 'SESSION and LOCAL modifiers act the same as for the
> >   regular SET command', but I don't think that's actually right...
>=20
> I cannot duplicate the behavior you show, in either HEAD or 8.2.
> Are you *sure* you were inside a transaction block?

Wow.  Okay, this is more interesting.  It has some interaction with:
\set ON_ERROR_ROLLBACK 'on'
in my .psqlrc.  If I remove that, then it works as expected.  My
understanding of ON_ERROR_ROLLBACK is that it'll set a savepoint before
each command and then will roll back to that savepoint on an error- but
it's still all inside of one main transaction.  Seems like
ON_ERROR_ROLLBACK is rolling back on a non-error in this case..  Strikes
me as very bizarre.

Try setting ON_ERROR_ROLLBACK to 'on' and doing 'set local role'...
This is on 8.2.4.

    Thanks,

        Stephen

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

Предыдущее
От: Arpi
Дата:
Сообщение: Re: BUG #3034: FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 'SET LOCAL ROLE blah;' doesn't work?