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 BANLkTikyAKsGXmjnjhBs4E4qr=hU=AGzQA@mail.gmail.com
Whole thread Raw
In response to Re: patch: Allow \dd to show constraint comments  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: patch: Allow \dd to show constraint comments
List pgsql-hackers
On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Excerpts from Josh Kupershmidt's message of dom jun 05 16:36:57 -0400 2011:
>> On Tue, May 24, 2011 at 10:31 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
>> > Attached is a rebased patch. From a quick look, it seems that most of
>> > the object types missing from \dd are already covered by pg_comments
>> > (cast, constraint, conversion, domain, language, operator class,
>> > operator family). A few objects would probably still need to be added
>> > (foreign data wrapper, server).
>>
>> Here's another update to this patch. Includes:
>>  * rudimentary doc page for pg_comments
>>  * 'foreign data wrapper' and 'server' comment types now included in
>> pg_comments; regression test updated
>
> Hmm, if we're going to have pg_comments as a syntactic sugar kind of
> thing, it should output things in format immediately useful to the user,
> i.e. relation/column/etc names and not OIDs.  The OIDs would force you
> to do lots of joins just to make it readable.

Well, that's basically what this is doing.  See the objname/objtype
columns.  It's intended that the output of this view should match the
format that COMMENT takes as input.  But propagating the OIDs through
is sensible as well, because sometimes people may want to do other
joins, filtering, etc.

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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Range Types and extensions
Next
From: Radoslaw Smogura
Date:
Subject: Re: BLOB support