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

From Brendan Jurd
Subject Re: [HACKERS] Show INHERIT in \du
Date
Msg-id 37ed240d0804130111k5ec1a6e0p289b758e5d21657e@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Show INHERIT in \du  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Show INHERIT in \du  ("Brendan Jurd" <direvus@gmail.com>)
List pgsql-patches
On Tue, Mar 25, 2008 at 2:41 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Brendan Jurd" <direvus@gmail.com> 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 addHeader and addCell.
>
>  > What do you think?  Overkill, or worthy pursuit?
>
>  Once you have two occurrences of a pattern, it's reasonable to assume
>  there will be more later.  +1 for building a little bit of infrastructure.
>

I've written a patch which implements the same \du behaviour as my
previous patch, but using the new printTable API I submitted in [1].

If the printTable API patch is rejected or substantially changed, we
will need to revisit this patch.

The new patch constructs a table manually, in the same manner as
describeOneTableDetails, so that we get the same outputs as the
original patch but without any of the localisation issues identified
by Tom and Alvaro.

I have attached a patch against my printTable code, containing only
the changes I made to describeRoles() (du-attributes_1.diff.bz2), and
a combined patch against HEAD containing the full printTable API
changes as well as the changes to describeRoles()
(du-attributes-print-table_1.diff.bz2).

No memory problems detected by valgrind, and all regression tests
passed on x86_64 gentoo.

I've added this item to the May CommitFest wiki page.

Cheers,
BJ

[1[ http://archives.postgresql.org/message-id/37ed240d0804120112w60c80089obd3a8c8ac72505f8@mail.gmail.com

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] sh: Add support Renesas SuperH
Next
From: Andrew Chernow
Date:
Subject: Re: libpq patch for pqtypes hook api and PGresult creation