Re: patch: Allow \dd to show constraint comments

Поиск
Список
Период
Сортировка
Искать
От
Robert Haas
Тема
Re: patch: Allow \dd to show constraint comments
Дата
Msg-id
BANLkTindqgQ0D8creWhd4PkOzu_v_PtvGA@mail.gmail.com
Ответ на
Список
Дерево обсуждения
patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Alvaro Herrera <alvherre@commandprompt.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Tom Lane <tgl@sss.pgh.pa.us>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Thom Brown <thom@linux.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Merlin Moncure <mmoncure@gmail.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Merlin Moncure <mmoncure@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Berkus <josh@agliodbs.com>
Re: patch: Allow \dd to show constraint comments Robert Haas <robertmhaas@gmail.com>
Re: patch: Allow \dd to show constraint comments Josh Kupershmidt <schmiddy@gmail.com>
On Mon, Jun 6, 2011 at 2:06 PM, Tom Lane  wrote:
> Robert Haas  writes:
>> On Mon, Jun 6, 2011 at 1:03 PM, Alvaro Herrera
>>  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.

Yep.

> 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.

Possibly.  On the other hand we have things like pg_tables floating
around that are basically useless because you can't get the OID
easily.  The information_schema suffers from this problem as well.  I
get what you're saying, but I think we should think two or three times
very carefully before throwing away the OID in a situation where it
can easily be provided.

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

В списке pgsql-hackers по дате отправления
От: Tom Lane
Дата:
От: Stephen Frost
Дата:
Сообщение: Re: Range Types and extensions
FAQ