Re: Things I don't like about \du's "Attributes" column
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Pavel Luzanov <p.luzanov@postgrespro.ru>
Cc: "David G. Johnston" <david.g.johnston@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Jim Nasby <jim.nasby@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-06-07T12:35:14Z
Lists: pgsql-hackers
On Thu, Jun 6, 2024 at 5:10 PM Pavel Luzanov <p.luzanov@postgrespro.ru> wrote: > Agree. > There is an additional technical argument for removing this replacement. > I don't like explicit cast to text of the "Connection limit" column. > Without 'Not allowed' it is no longer required. > Value -1 can be replaced by NULL with an implicit cast to integer. Yeah, +1 for that idea. > 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 | 0 | > regress_du_role1 | no | Create role+| infinity | | > | | Inherit | | | > regress_du_role2 | yes | Inherit +| | 42 | > | | Replication+| | | > | | Bypass RLS | | | > (4 rows) This seems unobjectionable to me. I am not sure whether it is better than the current verison, or whether it is what we want. But it seems reasonable. -- Robert Haas EDB: http://www.enterprisedb.com