Re: [HACKERS] Show INHERIT in \du - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: [HACKERS] Show INHERIT in \du
Date
Msg-id 20080320234119.GA14154@alvh.no-ip.org
Whole thread Raw
In response to Re: [HACKERS] Show INHERIT in \du  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: [HACKERS] Show INHERIT in \du  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Brendan Jurd escribió:
> I've done up a patch per Tom's idea of combining the binary role
> attributes into a single column.

Thanks -- this is nice.  I even went to apply it, but found a problem:
gettext localizes the NULL string to the localization header :-(  For
example:

alvherre=# \du
                                    Liste des rôles
 Nom du rôle |                         Attributes                          | Membre de
-------------+-------------------------------------------------------------+-----------
 alvherre    | Superuser                                                   | {}
             : Create role
             : Create DB
 asd         | No inherit                                                  | {}
             : No login
 bar         | Project-Id-Version: psql                                    | {}
             : Report-Msgid-Bugs-To:
             : POT-Creation-Date: 2007-12-17 11:14-0400
             : PO-Revision-Date: 2007-12-18 10:44+0100
             : Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>
             : Language-Team:  <fr@li.org>
             : MIME-Version: 1.0
             : Content-Type: text/plain; charset=ISO-8859-15
             : Content-Transfer-Encoding: 8bit
             : X-Generator: KBabel 1.11.4
             :
 foo         | No login                                                    | {asd}
(4 lignes)


Starting psql with LC_ALL=C shows the truth:

alvherre=# \du
            List of roles
 Role name | Attributes  | Member of
-----------+-------------+-----------
 alvherre  | Superuser   | {}
           : Create role
           : Create DB
 asd       | No inherit  | {}
           : No login
 bar       |             | {}
 foo       | No login    | {asd}
(4 rows)

I'm not sure how to fix this.  Thoughts?

--
Alvaro Herrera                        http://www.advogato.org/person/alvherre
Management by consensus: I have decided; you concede.
(Leonard Liu)

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Show INHERIT in \du
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Show INHERIT in \du