| From: | Stephen Frost <sfrost(at)snowman(dot)net> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: 'SET LOCAL ROLE blah;' doesn't work? |
| Date: | 2007-06-28 21:10:37 |
| Message-ID: | 20070628211037.GP7531@tamriel.snowman.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)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...
>
> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2007-06-29 02:06:09 | Re: 'SET LOCAL ROLE blah;' doesn't work? |
| Previous Message | Arpi | 2007-06-28 20:54:34 | Re: BUG #3034: FATAL: could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2007-06-28 21:16:54 | lazy vacuum sleeps with exclusive lock on table |
| Previous Message | imad | 2007-06-28 19:53:31 | Re: write past chunk end in ExprContext / to_char |