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. Maybe you should have a
column for the class of object the comment applies to, but as a name and
not a regclass. And then a column for names that each comment applies
to. (We're still struggling to get a useful pg_locks display). I mean,
if OIDs are good for you and you're OK with doing a few joins, why not
go to the underlying catalogs in the first place?
(IMHO anyway -- what do others think?)
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support