Re: Fix output of zero privileges in psql

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Fix output of zero privileges in psql
Дата
Msg-id CAKFQuwaU_-Yvsfmy93=WRaM89oqfV2QPSw+eCmOEZN0a4aEfcw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Fix output of zero privileges in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Monday, October 23, 2023, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Mon, 2023-10-23 at 11:37 -0700, David G. Johnston wrote:
>> I do believe that we should be against exposing, like in this case, any internal
>> implementation detail that encodes something (e.g., default privileges) as NULL
>> in the catalogs, to the user of the psql meta-commands.

> Sure, it would be best to hide this implementation detail from the user.
> The correct way to do that would be to fake an ACL entry like "laurenz=arwdDxt/laurenz"
> if there is a NULL in the catalog, but that would add a ton of special-case
> code to psql, which does not look appealing at all.

For better or worse, that *is* the backend's catalog representation,
and I don't think that psql would be doing our users a service by
trying to obscure the fact.  They'd run into it anyway the moment
they look at the catalogs with anything but a \d-something command.

Which many may never do, and those few that do will see immediately that the catalog uses null where they expected to see “(default)” and realize we made a presentational choice in the interests of readability and their query will need to make a choice regarding the null and empty arrays as well.

David J. 

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Fix output of zero privileges in psql
Следующее
От: jian he
Дата:
Сообщение: Re: More new SQL/JSON item methods