pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
RE: add \dpS to psq [16beta1]
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2023-06-29 dda9f8e7bc  Fix psql \?'s entries for \dp and \z.
* RE: add \dpS to psq [16beta1]
@ 2023-06-29 02:11 Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>
  2023-06-29 04:38 ` Re: add \dpS to psq [16beta1] Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Shinoda, Noriyoshi (PN Japan FSIP) @ 2023-06-29 02:11 UTC (permalink / raw)
  To: Nathan Bossart <nathandbossart@gmail.com>; Dean Rasheed <dean.a.rasheed@gmail.com>; +Cc: Maxim Orlov <orlovmg@gmail.com>; Andrew Dunstan <andrew@dunslane.net>; Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; Isaac Morland <isaac.morland@gmail.com>; Justin Pryzby <pryzby@telsasoft.com>; Pavel Luzanov <p.luzanov@postgrespro.ru>; pgsql-hackers

Hi,
Thank you for developing a good feature.
I found while testing PostgreSQL 16 Beta 1 that the output of the \? metacommand did not include \dS, \dpS. 
The attached patch changes the output of the \? meta command to:

Current output
psql=# \? 
  \z      [PATTERN]      same as \dp
  \dp     [PATTERN]      list table, view, and sequence access privileges

Patched output
psql=# \?
  \dp[S]  [PATTERN]      list table, view, and sequence access privileges
  \z[S]   [PATTERN]      same as \dp

Regards,
Noriyoshi Shinoda

-----Original Message-----
From: Nathan Bossart <nathandbossart@gmail.com> 
Sent: Tuesday, January 10, 2023 2:46 AM
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Maxim Orlov <orlovmg@gmail.com>; Andrew Dunstan <andrew@dunslane.net>; Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; Isaac Morland <isaac.morland@gmail.com>; Justin Pryzby <pryzby@telsasoft.com>; Pavel Luzanov <p.luzanov@postgrespro.ru>; pgsql-hackers@postgresql.org
Subject: Re: add \dpS to psql

On Sat, Jan 07, 2023 at 11:18:59AM +0000, Dean Rasheed wrote:
> It might be true that temp tables aren't usually interesting from a 
> permissions point of view, but it's not hard to imagine situations 
> where interesting things do happen. It's also probably the case that 
> most users won't have many temp tables, so I don't think including 
> them by default will be particularly intrusive.
> 
> Also, from a user perspective, I think it would be something of a POLA 
> violation for \dp[S] and \dt[S] to include different sets of tables, 
> though I appreciate that we do that now. There's nothing in the docs 
> to indicate that that's the case.

Agreed.

> Anyway, I've pushed the v2 patch as-is. If anyone feels strongly 
> enough that we should change its behaviour for temp tables, then we 
> can still discuss that.

Thanks!

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com 

Attachments:

psql_dpS_metacommand_v1.diff (application/octet-stream, 1.2K) download diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index c6478ed559..0ff595e7ee 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -277,7 +277,7 @@ slashUsage(unsigned short int pager) HELP0(" \\do[S+] [OPPTRN [TYPEPTRN [TYPEPTRN]]]\n" " list operators\n"); HELP0(" \\dO[S+] [PATTERN] list collations\n"); - HELP0(" \\dp [PATTERN] list table, view, and sequence access privileges\n"); + HELP0(" \\dp[S] [PATTERN] list table, view, and sequence access privileges\n"); HELP0(" \\dP[itn+] [PATTERN] list [only index/table] partitioned relations [n=nested]\n"); HELP0(" \\drds [ROLEPTRN [DBPTRN]] list per-database role settings\n"); HELP0(" \\dRp[+] [PATTERN] list replication publications\n"); @@ -293,7 +293,7 @@ slashUsage(unsigned short int pager) HELP0(" \\l[+] [PATTERN] list databases\n"); HELP0(" \\sf[+] FUNCNAME show a function's definition\n"); HELP0(" \\sv[+] VIEWNAME show a view's definition\n"); - HELP0(" \\z [PATTERN] same as \\dp\n"); + HELP0(" \\z[S] [PATTERN] same as \\dp\n"); HELP0("\n"); HELP0("Large Objects\n");
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: add \dpS to psq [16beta1]
  2023-06-29 02:11 RE: add \dpS to psq [16beta1] Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>
@ 2023-06-29 04:38 ` Nathan Bossart <nathandbossart@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Nathan Bossart @ 2023-06-29 04:38 UTC (permalink / raw)
  To: Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>; +Cc: Dean Rasheed <dean.a.rasheed@gmail.com>; Maxim Orlov <orlovmg@gmail.com>; Andrew Dunstan <andrew@dunslane.net>; Michael Paquier <michael@paquier.xyz>; Tom Lane <tgl@sss.pgh.pa.us>; Isaac Morland <isaac.morland@gmail.com>; Justin Pryzby <pryzby@telsasoft.com>; Pavel Luzanov <p.luzanov@postgrespro.ru>; pgsql-hackers

On Thu, Jun 29, 2023 at 02:11:43AM +0000, Shinoda, Noriyoshi (PN Japan FSIP) wrote:
> I found while testing PostgreSQL 16 Beta 1 that the output of the \? metacommand did not include \dS, \dpS. 
> The attached patch changes the output of the \? meta command to:

Thanks for the report!  I've committed your patch.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-06-29 04:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-06-29 02:11 RE: add \dpS to psq [16beta1] Shinoda, Noriyoshi (PN Japan FSIP) <noriyoshi.shinoda@hpe.com>
2023-06-29 04:38 ` Nathan Bossart <nathandbossart@gmail.com>

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