Re: Bug in pg_dump in 7.4.6? - Mailing list pgsql-general

From Greg Stark
Subject Re: Bug in pg_dump in 7.4.6?
Date
Msg-id 87d5wa1sm7.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Bug in pg_dump in 7.4.6?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug in pg_dump in 7.4.6?
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > It seems the spurious SET SESSION AUTHORIZATION commands appear after any
> > REVOKE/GRANT pair.
>
> Oh, right.  In order to handle grants with GRANT OPTION, the dump data
> may need to include SET SESSION AUTHORIZATION commands; so the code
> assumes that it doesn't know the authorization any more after emitting
> an ACL entry.  Not a bug.  It could possibly be smarter (eg grep the
> text for "SET SESSION AUTHORIZATION" before deciding this)

Wouldn't it make more sense to have a global state variable that held the
current user and anyone invoking SET SESSION AUTHORIZATION has to set that
state variable?

Or have a function responsible for emitting SET SESSION AUTHORIZATION and bar
other functions from doing it manually. Then have a local static variable in
that function responsible for keeping state.

> but since that's not the default mode anymore anyway, I'm not very
> concerned.

What's not the default mode? I'm just running "pg_dump -U postgresql -s db"

--
greg

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: OID of current function
Next
From: Tom Lane
Date:
Subject: Re: Bug in pg_dump in 7.4.6?