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-24 16:41:08
Message-ID: 5164.1206376868@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 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 would be creating a third
> copy of the same logic.

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

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-24 16:44:02 Re: Bug in libpq causes local clients to hang
Previous Message Jeffrey Baker 2008-03-24 16:37:40 Re: Bug in libpq causes local clients to hang

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2008-03-24 17:20:16 Re: script binaries renaming
Previous Message Brendan Jurd 2008-03-24 16:30:48 Re: [PATCHES] Show INHERIT in \du