Re: psql: bogus descriptions displayed by \d+

Поиск
Список
Период
Сортировка
От Josh Kupershmidt
Тема Re: psql: bogus descriptions displayed by \d+
Дата
Msg-id CAK3UJRG=HrkXDeeY=WbzKmqX-i5ka2Atqjx0teb1XrOa1_k-JQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql: bogus descriptions displayed by \d+  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: psql: bogus descriptions displayed by \d+
Список pgsql-hackers
On Sat, Jul 16, 2011 at 12:49 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> After a bit of review of the archives, the somebody was me:
> http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=b7d67954456f15762c04e5269b64adc88dcd0860
>
> and this thread was the discussion about it:
> http://archives.postgresql.org/pgsql-hackers/2009-12/msg01982.php
>
> It looks like we thought about pg_dump, but did not think about psql.

Ah, interesting. I didn't even know this functionality existed. And I
think there is some documentation lacking; in the 8.4 doc page:
http://www.postgresql.org/docs/8.4/static/sql-comment.html

I don't see any mention of comments on an index's columns. And the
docs also neglect to mention comments on a view's columns as well,
which is why I thought \d+ view_name was producing bogus output as
well (it's really looking for those column comments).

> I think it might be reasonable to remove the Description column from
> \d+ output for indexes and sequences, on the grounds that (1) it's
> useless against 9.x servers, and (2) for those relkinds we add other
> columns and so the horizontal space is precious.

AFAICT the extra Description column for \d+ sequence_name is bogus in
both 8.4 and 9.0, so there should be no objections to ripping that
out.

> We could also consider showing Description only when talking to a
> pre-9.0 server; but that's going to render the code even more
> spaghetti-ish, and the value seems pretty limited.

And as for \d+ index_name, I agree with Robert's sentiments here,
doesn't seem worth the bother.

Josh


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal: a validator for configuration files
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Enable CHECK constraints to be declared NOT VALID