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

From: Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Jim Nasby <jim(dot)nasby(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Things I don't like about \du's "Attributes" column
Date: 2024-02-17 18:06:16
Message-ID: 5d6d6930-4afd-4060-abdf-99d466b376fb@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.02.2024 00:44, Tom Lane wrote:
> "David G. Johnston"<david(dot)g(dot)johnston(at)gmail(dot)com> writes:
>> Per the recent bug report, we should probably add something like (ignored)
>> after the 50 connections for role1 since they are not allowed to login so
>> the value is indeed ignored. It is ignored to zero as opposed to unlimited
>> for the Superuser so maybe a different word (not allowed)?
> Not sure it's worth worrying about, but if we do I'd not bother to
> show the irrelevant value at all: it's just making the display wider
> to little purpose. We could make the column read as "(irrelevant)",
> or leave it blank. I'd argue the same for password expiration
> time BTW.

Please look at v5.

Changes:
- 'XXX(ignored)' replaced by '(irrelevant)' for 'Connection limit'.
for superusers with Connection limit
for roles without login and Connection limit
- 'XXX(invalid)' replaced by '(irrelevant)' for 'Valid until'.
for roles without password and Valid until
- 'Not allowed' replaced by '(not allowed)' for consistency.
for roles with Connection limit = 0

postgres(at)postgres(17.0)=# \du regress*
List of roles
Role name | Login | Attributes | Password? | Valid until | Connection limit
------------------+-------+-------------+-----------+------------------------+------------------
regress_du_admin | yes | Create role+| yes | infinity |
| | Inherit | | |
regress_du_role0 | yes | Create DB +| yes | 2024-12-31 00:00:00+03 |
| | Inherit +| | |
| | Replication+| | |
| | Bypass RLS | | |
regress_du_role1 | no | Inherit | no | (irrelevant) | (irrelevant)
regress_du_role2 | yes | Inherit | yes | | (not allowed)
regress_du_role3 | yes | | yes | | 10
regress_du_su | yes | Superuser +| yes | | (irrelevant)
| | Create DB +| | |
| | Create role+| | |
| | Inherit +| | |
| | Replication+| | |
| | Bypass RLS | | |
(6 rows)

--
Pavel Luzanov
Postgres Professional:https://postgrespro.com

Attachment Content-Type Size
v5-0001-Show-password-presence-in-pg_roles.patch text/x-patch 4.5 KB
v5-0002-psql-Rethinking-of-du-command.patch text/x-patch 19.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-02-17 18:14:19 Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
Previous Message Laurenz Albe 2024-02-17 16:48:23 Speeding up COPY TO for uuids and arrays