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

From Tom Lane
Subject Re: [HACKERS] Show INHERIT in \du
Date
Msg-id 5164.1206376868@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
List pgsql-patches
"Brendan Jurd" <direvus@gmail.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

pgsql-patches by date:

Previous
From: "Brendan Jurd"
Date:
Subject: Re: [HACKERS] Show INHERIT in \du
Next
From: Bruce Momjian
Date:
Subject: Re: script binaries renaming