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

From Rafia Sabih
Subject Re: Things I don't like about \du's "Attributes" column
Date
Msg-id CA+FpmFc-26rbbRt1f2dLAAb0DeY7b7Xj7ioOoBd5Ch5uJYq5Eg@mail.gmail.com
Whole thread Raw
In response to Re: Things I don't like about \du's "Attributes" column  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
Responses Re: Things I don't like about \du's "Attributes" column
List pgsql-hackers
On Sat, 13 Jul 2024 at 14:21, Pavel Luzanov <p.luzanov@postgrespro.ru> wrote:
>
> On 12.07.2024 12:22, Rafia Sabih wrote:
>
> Other thoughts came to my mind, should we have this column in \du+
> instead, maybe connection limit too.
> I know in the current version we have all this in \du itself, but then
> all clubbed in one column. But now since
> our table has got wider, it might be aesthetic to have it in the
> extended version. Also, their usage wise might not
> be the first thing to be looked at for a user/role.
>
> In the first version of the patch, "Valid until" (named "Password expire time")
> and "Connection limit" ("Max connections") columns were in extended mode. [1]
>
> Later we decided to place each attribute in the "Attributes" column on a separate
> line. This allowed us to significantly reduce the overall width of the output.
> So, I decided to move "Valid until" and "Connection limit" from extended mode
> to normal mode.
>
> Just compare output from patched \du and popular \list command:
>
> postgres@demo(17.0)=# \du
>                                 List of roles
>  Role name | Login | Attributes  |      Valid until       | Connection limit
> -----------+-------+-------------+------------------------+------------------
>  alice     | yes   | Inherit     | 2024-06-30 00:00:00+03 |
>  bob       | yes   | Inherit     | infinity               |
>  charlie   | yes   | Inherit     |                        |               11
>  postgres  | yes   | Superuser  +|                        |
>            |       | Create DB  +|                        |
>            |       | Create role+|                        |
>            |       | Inherit    +|                        |
>            |       | Replication+|                        |
>            |       | Bypass RLS  |                        |
> (4 rows)
>
> postgres@demo(17.0)=# \list
>                                                      List of databases
>    Name    |  Owner   | Encoding | Locale Provider |   Collate   |    Ctype    | Locale | ICU Rules |   Access
privileges
>
-----------+----------+----------+-----------------+-------------+-------------+--------+-----------+-----------------------
>  demo      | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           |
>  postgres  | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           |
>  template0 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | =c/postgres
    +
 
>            |          |          |                 |             |             |        |           |
postgres=CTc/postgres
>  template1 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |        |           | =c/postgres
    +
 
>            |          |          |                 |             |             |        |           |
postgres=CTc/postgres
> (4 rows)
>
> If we decide to move "Valid until" and "Connection limit" to extended mode,
> then the role attributes should be returned to their previous form by placing
> them on one line separated by commas.
>
> 1. https://www.postgresql.org/message-id/27f87cb9-229b-478b-81b2-157f94239d55%40postgrespro.ru
>
> --
> Pavel Luzanov
> Postgres Professional: https://postgrespro.com

Well, it was just my opinion of how I would have liked it better, but
of course you may decide against it, there is no strong feeling around
it.
And if you are on the fence with the opinion of having them in normal
or extended mode, then maybe we can ask more people to chip in.

I certainly would not want you to update the patch back and forth for
almost no reason.
-- 
Regards,
Rafia Sabih



pgsql-hackers by date:

Previous
From: Aleksander Alekseev
Date:
Subject: Re: gcc 13 warnings
Next
From: Thomas Munro
Date:
Subject: Re: broken JIT support on Fedora 40