Re: patch: Allow \dd to show constraint comments - Mailing list pgsql-hackers

From Robert Haas
Subject Re: patch: Allow \dd to show constraint comments
Date
Msg-id BANLkTikhrur1kA1OAyRp=8AbW-c5ZnfQsg@mail.gmail.com
Whole thread Raw
In response to Re: patch: Allow \dd to show constraint comments  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: patch: Allow \dd to show constraint comments  (Josh Kupershmidt <schmiddy@gmail.com>)
List pgsql-hackers
On Mon, May 23, 2011 at 10:13 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
> Well actually, I got into messing with this solely from the Todo list.
> Which, of course, neglected to mention the thread about pg_comments,
> or the other objects missing from \dd.

Heh.  Sounds like updating the Todo list would be a good place to start.

> Well, the real problem here, as I see it, is:
>  a.) We are schizophrenic about which comments are displayed by \dd
> and which are displayed by other backslash commands. And some comments
> aren't yet displayed anywhere, making the COMMENT ON syntax for them
> basically useless (what good is a comment no one can see without
> digging around in the system catalogs by hand..)
>  b.) One can comment on something like 32 different types of objects;
> so if we actually fixed all the holes in \dd, it could be a real
> nuisance trying to grep through its output to find the comments for
> the objects you're actually interested in. Which leads to the
> desirability of having a system view you could construct ad-hoc
> queries against.

+1.

> If we were to introduce pg_comments in 9.2, I would ideally want us to
> fix up \dd  to work better against older server versions (i.e. the
> original patch, plus some more work) as well, so the complaint about
> backwards compatibility shouldn't be a concern.

I'd be OK with someone working on that, but can't get riled up about
it myself.  We have stuff that we fix in every release that doesn't
work in older releases, and psql-9.2 compatibility with backend<=9.1
for a backslash command that's barely been updated this millenium is
not likely to rise to the top of my list of things to worry about.

> And if we followed Tom's logic about system views being bad ipso
> facto, we should want to rip out all non-critical system views (no, I
> don't want this). I would agree that if we want to create pg_comments
> we should make sure that, at the least, it displays comments for all
> object types from the get-go, given Tom's valid warning about the
> impossibility of upgrading a system view within a minor version.

Darn straight.  Sounds like a job for the regression tests.

> Your pg_comments.patch doesn't apply to git head anymore -- would you
> be interested in resurrecting this code for 9.2, assuming we can get
> support for this idea?

Yeah, I don't think it would be too hard to rebase; or you or someone
else might even want to pick it up.   :-)

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: Pull up aggregate subquery
Next
From: Robert Haas
Date:
Subject: Re: Pull up aggregate subquery