Re: How to display privileges in psql - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: How to display privileges in psql
Date
Msg-id 200407151856.i6FIuDk02304@candle.pha.pa.us
Whole thread Raw
In response to Re: How to display privileges in psql  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-hackers
Alvaro Herrera wrote:
> On Thu, Jul 15, 2004 at 10:41:49AM -0400, Bruce Momjian wrote:
> > Peter Eisentraut wrote:
> > > Maybe other people want to comment on this issue.
> > > 
> > > So far, \z and \dp have shown privileges of tables.
> > > 
> > > Now \dn+ and \db+ show the privileges of schemas and tablespaces.
> > > 
> > > Should we, for consistency, move the table privilege display to \dt+, or 
> > > should we move the schema and tablespace display to, say \zn and \zb?  Or 
> > > maybe this is not an issue at all.
> > 
> > Now that you mention it, it does seem nice to show permissions in \dt+.
> 
> IMHO the \dn+ output would get too wide if you do that.  I'd be in favor
> of using \z<letter> to display permissions of the object in \d<letter>

Is the new \db+ and \dn+ too wide now?

Actually it looks like \db+ is fine but \dn+ is long because it has both
permissions and a description:test=> \dt+               List of relations Schema | Name | Type  |  Owner   |
Description--------+------+-------+----------+-------------public | test | table | postgres |(1 row)test=> \db+
       List of tablespaces    Name    |  Owner   | Location | Access
privileges------------+----------+----------+-------------------pg_default | postgres |          | pg_global  |
postgres|          |(2 rows)test=> \dn+                                            List of schemas        Name        |
Owner   |          Access privileges          |
Description--------------------+----------+-------------------------------------+----------------------------------
information_schema| postgres | {postgres=UC/postgres,=U/postgres}  | pg_catalog         | postgres |
{postgres=UC/postgres,=U/postgres} | System catalog schema pg_toast           | postgres |
      | Reserved schema for TOAST tables public             | postgres | {postgres=UC/postgres,=UC/postgres} | Standard
publicschema(4 rows)
 

> Something that annoys me is that the \? shows
> 
> \dt        description of what it does ...
>         add + for more details
> 
> where it should be
> 
> \dt[+]        same description
> 
> No need to say what the + does, it should be obvious.

Good idea.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: How to display privileges in psql
Next
From: Andreas Pflug
Date:
Subject: SysLogger subprocess