Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-04-15 Thread Brendan Jurd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Apr 13, 2008 at 6:11 PM, Brendan Jurd wrote: > I've written a patch which implements the same \du behaviour as my > previous patch, but using the new printTable API New versions of this patch, including changes made to the printTable API in

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-04-13 Thread Brendan Jurd
On Tue, Mar 25, 2008 at 2:41 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Brendan Jurd" <[EMAIL PROTECTED]> writes: > > This makes me wonder whether print.c could offer something a bit more > > helpful to callers wishing to DIY a table; we could have a > > table-building struct with methods like a

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-24 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > I've had a chance to look at this now, and although it certainly does > seem workable, there's a lot of duplication of code that I feel uneasy > about. describeOneTableDetails essentially already duplicates the > table buildling code in printQuery, so I

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-24 Thread Brendan Jurd
On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Brendan Jurd" <[EMAIL PROTECTED]> writes: > > We can't just build the output table by hand like > > describeOneTableDetails does? Admittedly it's kludgy, but it's not an > > unprecedented kludge. > > > Oh, I had forgotten the existence of tha

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Brendan Jurd
On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > "Brendan Jurd" <[EMAIL PROTECTED]> writes: > > > We can't just build the output table by hand like > > describeOneTableDetails does? Admittedly it's kludgy, but it's not an > > unprecedented kludge. > > Oh, I had forgotten the existence of tha

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: >> The code is now set up so that it can pass an entire field value >> through gettext(), but if gettext recognizes the strings "foo" and >> "bar" that doesn't mean it will do anything useful with "foo\n

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Brendan Jurd
On 21/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > > The code is now set up so that it can pass an entire field value > through gettext(), but if gettext recognizes the strings "foo" and > "bar" that doesn't mean it will do anything useful with "foo\nbar", > which is what this patch would req

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > gettext localizes the NULL string to the localization header :-( For > example: Oooh, that's even different from the one I thought of :-(. Yeah, we've got a problem here. We could fix that particular issue by changing print.c so that it doesn't attem

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Alvaro Herrera
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

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-20 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > I've done up a patch per Tom's idea of combining the binary role > attributes into a single column. I started to look at committing this and realized that there's a very nasty problem: our current approach to localizing the strings won't work. See this

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-04 Thread Bruce Momjian
Your patch has been added to the PostgreSQL unapplied patches list at: http://momjian.postgresql.org/cgi-bin/pgpatches It will be applied as soon as one of the PostgreSQL committers reviews and approves it. --- Br

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-04 Thread Bruce Momjian
Alvaro Herrera wrote: > Brendan Jurd escribi?: > > I've done up a patch per Tom's idea of combining the binary role > > attributes into a single column. > > This patch seems to be missing from the queue. Yes because I am still processing email from two weeks ago. I was in Europe for a week. --

Re: [PATCHES] [HACKERS] Show INHERIT in \du

2008-03-04 Thread Alvaro Herrera
Brendan Jurd escribió: > I've done up a patch per Tom's idea of combining the binary role > attributes into a single column. This patch seems to be missing from the queue. -- Alvaro Herrerahttp://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom D

Re: [HACKERS] Show INHERIT in \du

2008-02-17 Thread Brendan Jurd
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 -++-

Re: Key for grant attributes (was: Re: [HACKERS] Show INHERIT in \du)

2008-02-14 Thread Brendan Jurd
On Fri, Feb 15, 2008 at 12:19 PM, Decibel! <[EMAIL PROTECTED]> wrote: > On Feb 14, 2008, at 7:27 AM, Alvaro Herrera wrote: > > Attributes: S -- superuser > > R -- create role > > D -- create database > > I -- inherit > > > Can we add something similar to the bot

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Decibel!
On Feb 14, 2008, at 5:50 PM, Tom Lane wrote: "Brendan Jurd" <[EMAIL PROTECTED]> writes: What about connection limit? I suppose we could combine it into the privileges column, and refrain from displaying anything for "no limit". "5 connections" seems a bit odd for a "privilege". I'd be happy

Key for grant attributes (was: Re: [HACKERS] Show INHERIT in \du)

2008-02-14 Thread Decibel!
On Feb 14, 2008, at 7:27 AM, Alvaro Herrera wrote: Attributes: S -- superuser R -- create role D -- create database I -- inherit Can we add something similar to the bottom of \z? -- Decibel!, aka Jim C. Nasby, Database Architect [EMAIL PROTECTED] Give your

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Brendan Jurd
On Fri, Feb 15, 2008 at 10:50 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "Brendan Jurd" <[EMAIL PROTECTED]> writes: > > What about connection limit? I suppose we could combine it into the > > privileges column, and refrain from displaying anything for "no > > limit". > > "5 connections" seems a

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > What about connection limit? I suppose we could combine it into the > privileges column, and refrain from displaying anything for "no > limit". "5 connections" seems a bit odd for a "privilege". I'd be happy with leaving that as a separate column. Or

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Brendan Jurd
On Fri, Feb 15, 2008 at 3:42 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > Now that psql prints multiline field values nicely, maybe it'd work > to fold all the boolean attributes into one column. I'm imagining > something like > > Role name | Privileges | Member of > --+-+--

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Alvaro Herrera
Tom Lane escribió: > Now that psql prints multiline field values nicely, maybe it'd work > to fold all the boolean attributes into one column. I'm imagining > something like > > Role name | Privileges | Member of > --+-+--- > postgres | superuser | {} >

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Guillaume Lelarge
Alvaro Herrera a écrit : [...] For those that think that the \du output is currently OK because it doesn't wrap, consider the french translation which is quite a bit wider than the original: alvherre=# \du Liste des rôles Nom du rôle | Superutilisateur | Cr

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Tom Lane
Bernd Helmle <[EMAIL PROTECTED]> writes: > --On Donnerstag, Februar 14, 2008 10:27:37 -0300 Alvaro Herrera > <[EMAIL PROTECTED]> wrote: >> I wonder if it's possible to create a more compact output -- say, a >> fixed-width column, with a letter for each enabled attribute, or a space >> in the respe

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Bernd Helmle
--On Donnerstag, Februar 14, 2008 10:27:37 -0300 Alvaro Herrera <[EMAIL PROTECTED]> wrote: I wonder if it's possible to create a more compact output -- say, a fixed-width column, with a letter for each enabled attribute, or a space in the respective position when the attribute is disabled. Leg

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Alvaro Herrera
Brendan Jurd escribió: > Hello hackers, > > psql's \du command currently does not list the INHERIT role attribute. > It does show the other privilege attributes (superuser, create role, > create db), and INHERIT seems like the kind of thing a user > executing\du would want to know. > > I'd like

Re: [HACKERS] Show INHERIT in \du

2008-02-14 Thread Bernd Helmle
--On Donnerstag, Februar 14, 2008 15:52:31 +1100 Brendan Jurd <[EMAIL PROTECTED]> wrote: Hello hackers, psql's \du command currently does not list the INHERIT role attribute. It does show the other privilege attributes (superuser, create role, create db), and INHERIT seems like the kind of th

[HACKERS] Show INHERIT in \du

2008-02-13 Thread Brendan Jurd
Hello hackers, psql's \du command currently does not list the INHERIT role attribute. It does show the other privilege attributes (superuser, create role, create db), and INHERIT seems like the kind of thing a user executing\du would want to know. I'd like to add it to \du. The downside is that