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

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

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