Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Дата
Msg-id CAD21AoC5qNd8psDS4x792DCeuC3xcBmq6Bjrkj8_P1sAscJz4Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Tue, Oct 19, 2021 at 12:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Masahiko Sawada <sawada.mshk@gmail.com> writes:
> > I've looked at the patch proposed you proposed. If we can depend on
> > acldefault() being STRICT (which is legitimate to me), I think we
> > don't need to build an expression depending on the caller (i.g.,
> > is_default_acl). If acldefault() were to become not STRICT, we could
> > detect it by regression tests. What do you think?
>
> FWIW, I'm working on a refactoring of this logic that will bring the
> acldefault() call into the getDefaultACLs code, which would mean that
> we won't need that assumption anymore anyway.  The code as I have it
> produces SQL like
>
>      acldefault(CASE WHEN defaclobjtype = 'S'
>                 THEN 's'::"char" ELSE defaclobjtype END, defaclrole) AS acldefault
>
> and we could wrap the test-for-zero around that:
>
>      CASE WHEN defaclnamespace = 0 THEN
>        acldefault(CASE WHEN defaclobjtype = 'S'
>                   THEN 's'::"char" ELSE defaclobjtype END, defaclrole)
>      ELSE NULL END AS acldefault
>
> (although I think it might be better to write ELSE '{}' not ELSE NULL).
>
> So I think we don't need to worry about whether acldefault() will stay
> strict.  This patch will only need to work in the back branches.

+1

Regards,

-- 
Masahiko Sawada
EDB:  https://www.enterprisedb.com/



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

Предыдущее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: Inconsistent behavior of pg_dump/pg_restore on DEFAULT PRIVILEGES
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #17237: set_config: Custom parameter names must be two or more simple identifiers separated by dots.