From: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Maxim Orlov <orlovmg(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Pavel Luzanov <p(dot)luzanov(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: add \dpS to psql |
Date: | 2023-01-07 11:18:59 |
Message-ID: | CAEZATCVWxf5P+r4hrKcM8kX6_Y5gmD4OnH74kb2qiqiV3FwL9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, 7 Jan 2023 at 00:36, Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Fri, Jan 06, 2023 at 06:52:33PM +0000, Dean Rasheed wrote:
> >
> > So I think we should use the same SQL clauses as every other psql
> > command that supports "S", namely:
> >
> > if (!showSystem && !pattern)
> > appendPQExpBufferStr(&buf, " AND n.nspname <> 'pg_catalog'\n"
> > " AND n.nspname <> 'information_schema'\n");
>
> Good catch. I should have noticed this. The deleted comment mentions that
> the system/temp tables normally aren't very interesting from a permissions
> perspective, so perhaps there is an argument for always excluding temp
> tables without a pattern. After all, \dp always excludes indexes and TOAST
> tables. However, it looks like \dt includes temp tables, and I didn't see
> any other meta-commands that excluded them.
>
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.
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.
Regards,
Dean
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2023-01-07 11:58:03 | Re: Todo: Teach planner to evaluate multiple windows in the optimal order |
Previous Message | Ankit Kumar Pandey | 2023-01-07 11:14:40 | Re: Todo: Teach planner to evaluate multiple windows in the optimal order |