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

From Tom Lane
Subject Re: [HACKERS] Show INHERIT in \du
Date
Msg-id 25919.1206055610@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Show INHERIT in \du  ("Brendan Jurd" <direvus@gmail.com>)
Responses Re: [HACKERS] Show INHERIT in \du  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-patches
"Brendan Jurd" <direvus@gmail.com> 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 patch for background:
http://archives.postgresql.org/pgsql-committers/2007-12/msg00187.php

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 require.

I suspect that to solve this in a non-kluge fashion we'd need to make
\du pull over the plain boolean and integer values, then build a new
PGresult data structure on its own.  Ugh.  (Actually, without any
support from libpq for building PGresults, it's hard to imagine doing
that in a way that wouldn't be a kluge itself.)

Or we could go back to the drawing board on what the output ought to
look like.

Thoughts?

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [GENERAL] Empty arrays with ARRAY[]
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Show INHERIT in \du