Brendan Jurd escribió:
> Hello hackers,
>
> psql's \du command currently does not list the INHERIT role attribute.
> It does show the other privilege attributes (superuser, create role,
> create db), and INHERIT seems like the kind of thing a user
> executing\du would want to know.
>
> I'd like to add it to \du. The downside is that it would add width to
> an already rather wide output, but I see that as a worthwhile
> tradeoff. If I'm in the minority there, perhaps I could just add it
> to \du+?
I wonder if it's possible to create a more compact output -- say, a
fixed-width column, with a letter for each enabled attribute, or a space
in the respective position when the attribute is disabled. Legend of
letter at the bottom of the output, or some such. So instead of
alvherre=# \du List of rolesRole name | Superuser | Create role | Create DB | Connections
|Member of
-----------+-----------+-------------+-----------+-------------+-----------alvherre | yes | yes | yes
| no limit | {}foo | no | no | yes | no limit | {}
(2 rows)
We would have something like
alvherre=# \du List of rolesRole name | Attributes | Connections | Member of
-----------+------------+-------------+-----------alvherre | SRDI | no limit | {}foo | D | no
limit | {}
(2 rows)
Attributes: S -- superuser R -- create role D -- create database I -- inherit
For those that think that the \du output is currently OK because it
doesn't wrap, consider the french translation which is quite a bit wider
than the original:
alvherre=# \du Liste des rôlesNom du rôle | Superutilisateur | Créer un rôle |
Créerune base | Connexions | Membre de
-------------+------------------+---------------+----------------+-------------+-----------alvherre | oui
| oui | oui | sans limite | {}
(1 ligne)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support