Re: [PATCHES] Show INHERIT in \du

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Brendan Jurd" <direvus(at)gmail(dot)com>
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: [PATCHES] Show INHERIT in \du
Date: 2008-03-20 23:26:50
Message-ID: 25919.1206055610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Brendan Jurd" <direvus(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-20 23:41:19 Re: [PATCHES] Show INHERIT in \du
Previous Message Neil Conway 2008-03-20 23:07:27 Re: Integer datetimes

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-20 23:41:19 Re: [PATCHES] Show INHERIT in \du
Previous Message Tom Lane 2008-03-20 21:47:34 Re: [PATCHES] [GENERAL] Empty arrays with ARRAY[]