Re: 'SET LOCAL ROLE blah;' doesn't work? - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: 'SET LOCAL ROLE blah;' doesn't work?
Date
Msg-id 20070629021401.GN32626@alvh.no-ip.org
Whole thread Raw
In response to Re: 'SET LOCAL ROLE blah;' doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: 'SET LOCAL ROLE blah;' doesn't work?  (Stephen Frost <sfrost@snowman.net>)
List pgsql-bugs
Tom Lane wrote:

> and the postmaster log has
>
> 2007-06-28 22:02:14.418 EDT 2870 LOG:  statement: begin;
> 2007-06-28 22:02:26.044 EDT 2870 LOG:  statement: SAVEPOINT pg_psql_temporary_savepoint
> 2007-06-28 22:02:26.045 EDT 2870 LOG:  statement: set local role tgl;
> 2007-06-28 22:02:26.047 EDT 2870 LOG:  statement: RELEASE pg_psql_temporary_savepoint
> 2007-06-28 22:02:57.545 EDT 2870 LOG:  statement: SAVEPOINT pg_psql_temporary_savepoint
> 2007-06-28 22:02:57.546 EDT 2870 LOG:  statement: show role;
> 2007-06-28 22:02:57.548 EDT 2870 LOG:  statement: RELEASE pg_psql_temporary_savepoint
>
> So actually, ON_ERROR_ROLLBACK breaks *any* use of SET LOCAL, not just
> ROLE.  Not sure that this is fixable :-(

Maybe if psql sees "SET LOCAL" it shouldn't send the RELEASE command.
But it seems a bit error prone to be finding each command that may be
affected by RELEASE ... what other thing do we have that works at the
level of subtransactions?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: 'SET LOCAL ROLE blah;' doesn't work?
Next
From: Stephen Frost
Date:
Subject: Re: 'SET LOCAL ROLE blah;' doesn't work?