Re: Things I don't like about \du's "Attributes" column - Mailing list pgsql-hackers

From Pavel Luzanov
Subject Re: Things I don't like about \du's "Attributes" column
Date
Msg-id c4d81aef-cb96-4b80-b58b-224d013f8c97@postgrespro.ru
Whole thread Raw
In response to Re: Things I don't like about \du's "Attributes" column  ("Wen Yi" <wen-yi@qq.com>)
Responses Re: Things I don't like about \du's "Attributes" column
List pgsql-hackers
Hi,

On 14.04.2024 05:02, Wen Yi wrote:
I think we can change the output like this:

postgres=# \du                                List of roles Role name | Login | Attributes  | Password | Valid until | Connection limit 
-----------+-------+-------------+----------+-------------+------------------ test      |       | Inherit     |          |             |  test2     | Can   | Inherit     | Has      |             |  wenyi     | Can   | Superuser  +|          |             |            |       | Create DB  +|          |             |            |       | Create role+|          |             |            |       | Inherit    +|          |             |            |       | Replication+|          |             |            |       | Bypass RLS  |          |             | 
(3 rows)

And I submit my the patch, have a look?
Thanks for the patch.

As I understand, your patch is based on my previous version.
The main thing I'm wondering about my patch is if we need to change pg_roles,
and it looks like we don't. So, in the next version of my patch,
the Password column will no longer be there.

As for the Login column and its values.
I'm not sure about using "Can" instead of "yes" to represent true.
In other psql commands, boolean values are always shown as yes/no.
NULL instead of false might be possible, but I'd rather check if this approach
has been used elsewhere. I prefer consistency everywhere.

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

pgsql-hackers by date:

Previous
From: Robins Tharakan
Date:
Subject: Re: Why is parula failing?
Next
From: Stefan Fercot
Date:
Subject: Re: pg_combinebackup fails on file named INCREMENTAL.*