Re: Usability fail with psql's \dp command

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: Usability fail with psql's \dp command
Дата
Msg-id alpine.DEB.2.21.1807311438470.6919@lancre
обсуждение исходный текст
Ответ на Usability fail with psql's \dp command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> One idea is to replace a null ACL value with the actual effective
> permissions, which we could get from the acldefault() function.
> However, acldefault() only exists since 9.2, and in any case
> I'm afraid that might be perceived as mostly clutter.

Here is an poc implementation of this which does not rely on 
"acldefault()". Cannot say I'm thrilled, but it is not too bad either. I 
worked around \ddp with a recursion.

Writing this piece code makes me realize once again the abysmal coverage 
of psql non-regression tests, where basically no \d* functions are tested. 
I think at least this part could be salvage from the patch.

Another benefit of expliciting the defaults is that the documentation can 
be made more straightforward: shown permissions means what you can see, 
which simplifies the description.

Another implementation approach could be to use acldefault() from 9.2, and 
just display (no privileges) and (default privileges) before, as suggested 
on the thread. This would probably help simplify the code.

I find that having "default privileges" written as not very helpful, 
because you have to remember them. Ok, it is all perms for the owner, but 
then there are some objects which also have some permissions to public, 
and do not memorize these exception. Also, some \d* (eg \dT \dD) do not 
display the owner.

I do not perceive as "clutter" the fact that a column advertising "Access 
privileges" provides the access privileges... Mostly it is shown only 
under "+";  For \dp, you ask for it, you get it.

-- 
Fabien.
Вложения

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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: patch to ensure logical decoding errors early
Следующее
От: Andres Freund
Дата:
Сообщение: Re: patch to ensure logical decoding errors early