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

Reply via email to