Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Дата
Msg-id 2008944.1634680714@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES  ("Bossart, Nathan" <bossartn@amazon.com>)
Ответы Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
"Bossart, Nathan" <bossartn@amazon.com> writes:
> On 10/19/21, 12:54 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>> I kind of wonder now whether the existing behavior is correct for either
>> case.

> Hm.  If we do this, then this command:
>         ALTER DEFAULT PRIVILEGES FOR ROLE myrole REVOKE ALL ON FUNCTIONS FROM PUBLIC;
> is dumped as:
>         ALTER DEFAULT PRIVILEGES FOR ROLE myrole GRANT ALL ON FUNCTIONS  TO myrole;

[ pokes at it some more... ]  Yeah, I just didn't have my head screwed
on straight.  We need the global entries to be dumped as deltas from
the proper object-type-specific ACL, while the non-global ones should be
dumped as grants only, which can be modeled as a delta from an empty
ACL.  So the patch should be good as given (though maybe the comment
needs more work to clarify this).  Sorry for the noise.

            regards, tom lane



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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: BUG #17235: PQsendQuery (with two sql) after PQenterPipelineMode cause ERROR