public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Zhang <[email protected]>
To: David G. Johnston <[email protected]>
Cc: Pavel Luzanov <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: psql: Add role's membership options to the \du+ command
Date: Wed, 15 Feb 2023 13:31:05 -0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKFQuwYt3ENZoYgY2RBh-U4id_=vntT9uJ83PvxPSsPQ0Cc_Jw@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAKFQuwYt3ENZoYgY2RBh-U4id_=vntT9uJ83PvxPSsPQ0Cc_Jw@mail.gmail.com>

On 2023-02-10 2:27 p.m., David G. Johnston wrote:
> On Fri, Feb 10, 2023 at 2:08 PM David Zhang <[email protected]> wrote:
>
>
>     I noticed the document psql-ref.sgml has been updated for both
>     `du+` and
>     `dg+`, but only `du` and `\du+` are covered in regression test. Is
>     that
>     because `dg+` is treated exactly the same as `du+` from testing
>     point of
>     view?
>
>
> Yes.
>
>
>     The reason I am asking this question is that I notice that
>     `pg_monitor`
>     also has the detailed information, so not sure if more test cases
>     required.
>
>
> Of course it does.  Why does that bother you?  And what does that have 
> to do with the previous paragraph?

There is a default built-in role `pg_monitor` and the behavior changed 
after the patch. If `\dg+` and `\du+` is treated as the same, and `make 
check` all pass, then I assume there is no test case to verify the 
output of `duS+`. My point is should we consider add a test case?

Before patch the output for `pg_monitor`,

postgres=# \duS+
List of roles
           Role name          | Attributes                         | 
Member of                           | Description
-----------------------------+------------------------------------------------------------+--------------------------------------------------------------+-------------
  alice |                                                            | 
{pg_read_all_settings,pg_read_all_stats,pg_stat_scan_tables} |
  pg_checkpoint               | Cannot 
login                                               | 
{}                                                           |
  pg_database_owner           | Cannot 
login                                               | 
{}                                                           |
  pg_execute_server_program   | Cannot 
login                                               | 
{}                                                           |
  pg_maintain                 | Cannot 
login                                               | 
{}                                                           |
  pg_monitor                  | Cannot 
login                                               | 
{pg_read_all_settings,pg_read_all_stats,pg_stat_scan_tables} |
  pg_read_all_data            | Cannot 
login                                               | 
{}                                                           |
  pg_read_all_settings        | Cannot 
login                                               | 
{}                                                           |
  pg_read_all_stats           | Cannot 
login                                               | 
{}                                                           |
  pg_read_server_files        | Cannot 
login                                               | 
{}                                                           |
  pg_signal_backend           | Cannot 
login                                               | 
{}                                                           |
  pg_stat_scan_tables         | Cannot 
login                                               | 
{}                                                           |
  pg_use_reserved_connections | Cannot 
login                                               | 
{}                                                           |
  pg_write_all_data           | Cannot 
login                                               | 
{}                                                           |
  pg_write_server_files       | Cannot 
login                                               | 
{}                                                           |
  ubuntu                      | Superuser, Create role, Create DB, 
Replication, Bypass RLS | 
{}                                                           |

After patch the output for `pg_monitor`,

postgres=# \duS+
List of roles
           Role name          | Attributes                         
|                   Member of                   | Description
-----------------------------+------------------------------------------------------------+-----------------------------------------------+-------------
  alice |                                                            | 
pg_read_all_settings WITH ADMIN, INHERIT, SET+|
|                                                            | 
pg_read_all_stats WITH INHERIT               +|
|                                                            | 
pg_stat_scan_tables                           |
  pg_checkpoint               | Cannot login 
|                                               |
  pg_database_owner           | Cannot login 
|                                               |
  pg_execute_server_program   | Cannot login 
|                                               |
  pg_maintain                 | Cannot login 
|                                               |
  pg_monitor                  | Cannot 
login                                               | 
pg_read_all_settings WITH INHERIT, SET       +|
|                                                            | 
pg_read_all_stats WITH INHERIT, SET          +|
|                                                            | 
pg_stat_scan_tables WITH INHERIT, SET         |
  pg_read_all_data            | Cannot login 
|                                               |
  pg_read_all_settings        | Cannot login 
|                                               |
  pg_read_all_stats           | Cannot login 
|                                               |
  pg_read_server_files        | Cannot login 
|                                               |
  pg_signal_backend           | Cannot login 
|                                               |
  pg_stat_scan_tables         | Cannot login 
|                                               |
  pg_use_reserved_connections | Cannot login 
|                                               |
  pg_write_all_data           | Cannot login 
|                                               |
  pg_write_server_files       | Cannot login 
|                                               |
  ubuntu                      | Superuser, Create role, Create DB, 
Replication, Bypass RLS |                                               |


Best regards,

David

>
> David J.

view thread (9+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: psql: Add role's membership options to the \du+ command
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox