Re: [PATCHES] Show INHERIT in \du

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [PATCHES] Show INHERIT in \du
Дата
Msg-id 37ed240d0803240930y6fcad470i784ec8f3bc05f968@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCHES] Show INHERIT in \du  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] Show INHERIT in \du  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 21/03/2008, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Brendan Jurd" <direvus@gmail.com> writes:
> > We can't just build the output table by hand like
>  > describeOneTableDetails does?  Admittedly it's kludgy, but it's not an
>  > unprecedented kludge.
>
>
> Oh, I had forgotten the existence of that entry point in print.c.  Yeah,
>  it might be workable --- want to have a go at it?
>

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?

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Bug in libpq causes local clients to hang
Следующее
От: "Jeffrey Baker"
Дата:
Сообщение: Re: Bug in libpq causes local clients to hang