Re: Bug in pg_dump in 7.4.6?

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Bug in pg_dump in 7.4.6?
Дата
Msg-id 87d5wa1sm7.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Bug in pg_dump in 7.4.6?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Bug in pg_dump in 7.4.6?
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: OID of current function
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug in pg_dump in 7.4.6?