Re: Things I don't like about \du's "Attributes" column

Поиск
Список
Период
Сортировка
От Pavel Luzanov
Тема Re: Things I don't like about \du's "Attributes" column
Дата
Msg-id a76175f6-aa05-4910-b6e0-994037a3f11c@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Things I don't like about \du's "Attributes" column  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
Ответы Re: Things I don't like about \du's "Attributes" column
Список pgsql-hackers
On 16.04.2024 09:15, Pavel Luzanov wrote:
On 16.04.2024 01:06, David G. Johnston wrote:
At this point I'm on board with retaining the \dr charter of simply being
an easy way to access the detail exposed in pg_roles with some display
formatting but without any attempt to convey how the system uses said
information.  Without changing pg_roles.  Our level of effort here, and
degree of dependence on superuser, doesn't seem to be bothering people
enough to push more radical changes here through and we have good
improvements that are being held up in the hope of possible perfection.
I have similar thoughts.
I decided to wait for the end of feature freeze and propose a simpler version
of the patch for v18, without changes in pg_roles

Since no votes for the changes in pg_roles, please look the simplified version.
We can return to this topic later.

But now there are no changes in pg_roles. Just a special interpretation
of the two values of the "Connection limit" column:  0 - Now allowed (changed from 'No connections') -1 - empty string

Full list of changes in commit message.
Example output:

\du+ regress_du*                                                List of roles    Role name     | Login | Attributes  |         Valid until          | Connection limit |   Description    
------------------+-------+-------------+------------------------------+------------------+------------------ regress_du_admin | yes   | Superuser  +|                              |                  | some description                  |       | Create DB  +|                              |                  |                   |       | Create role+|                              |                  |                   |       | Inherit    +|                              |                  |                   |       | Replication+|                              |                  |                   |       | Bypass RLS  |                              |                  |  regress_du_role0 | yes   | Inherit     | Tue Jun 04 00:00:00 2024 PDT | Not allowed      |  regress_du_role1 | no    | Create role+| infinity                     |                  |                   |       | Inherit     |                              |                  |  regress_du_role2 | yes   | Inherit    +|                              | 42               |                   |       | Replication+|                              |                  |                   |       | Bypass RLS  |                              |                  | 
(4 rows)

Data:
CREATE ROLE regress_du_role0 LOGIN PASSWORD '123' VALID UNTIL '2024-06-04' CONNECTION LIMIT 0;
CREATE ROLE regress_du_role1 CREATEROLE CONNECTION LIMIT -1 VALID UNTIL 'infinity';
CREATE ROLE regress_du_role2 LOGIN REPLICATION BYPASSRLS CONNECTION LIMIT 42;
CREATE ROLE regress_du_admin LOGIN SUPERUSER CREATEROLE CREATEDB BYPASSRLS REPLICATION INHERIT;
COMMENT ON ROLE regress_du_admin IS 'some description';

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com
Вложения

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

Предыдущее
От: "Wang Cheng"
Дата:
Сообщение: Re: Proposal: Job Scheduler
Следующее
От: Dilip Kumar
Дата:
Сообщение: Remove dependency on VacuumPage(Hit/Miss/Dirty) counters in do_analyze_rel