Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Show INHERIT in \du

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bernd Helmle" <mailings(at)oopsware(dot)de>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Show INHERIT in \du
Date: 2008-02-17 10:56:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
I've done up a patch per Tom's idea of combining the binary role
attributes into a single column.

Each attribute which differs from the default is listed on a separate
line, like so:

                  List of roles
  Role name  |   Attributes   |     Member of
 bob         |                | {readers,writers}
 brendanjurd | Superuser      | {}
             : Create role
             : Create DB
 harry       | No inherit     | {}
 jim         | 10 connections | {readers}
 readers     | No login       | {}
 writers     | No login       | {}
(6 rows)


 * The patch relies on array_to_string's current treatment of NULL
values in the array; they are ignored.  If that behaviour changes in
the future, the \du output will become very ugly indeed.
 * I'm not sure whether "No login" and "No inherit" are the best
phrases to use.  I took my cue from the SQL setting names NOLOGIN and
NOINHERIT, but maybe something more grammatically sensible with
"Cannot login" and "No inheritance" would be preferable.
 * If accepted, this patch would supercede the earlier patch mentioned
by Bernd Helmle upthread, which adds LOGIN to the output as a new


Attachment: du_attributes.diff
Description: text/plain (2.6 KB)

In response to


pgsql-hackers by date

Next:From: SureshDate: 2008-02-17 15:33:43
Subject: Doubt in IndexScanDescData
Previous:From: Peter EisentrautDate: 2008-02-16 19:28:42
Subject: Re: CVS repository invalid revision

pgsql-patches by date

Next:From: Tom LaneDate: 2008-02-17 18:12:19
Subject: Proposed patch to change TOAST compression strategy
Previous:From: Tom LaneDate: 2008-02-16 21:21:45
Subject: Re: tzcode update

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group