From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Josh Kupershmidt <schmiddy(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: patch: Allow \dd to show constraint comments |
Date: | 2011-06-06 18:06:35 |
Message-ID: | 9987.1307383595@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
>> 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.
Is it also propagating the catalog OID through? Because joining on OID
alone is not to be trusted.
I tend to agree with Alvaro's viewpoint here: anybody who wants to deal
directly in OIDs is better off joining directly to pg_description, and
not going through the rather large overhead that this view is going to
impose. So we should just make this a purely user-friendly view and be
done with it, not try to create an amalgam that serves neither purpose
well.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2011-06-06 18:10:06 | Re: patch: Allow \dd to show constraint comments |
Previous Message | Robert Haas | 2011-06-06 18:03:29 | heap_hot_search_buffer refactoring |