From: | Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com> |
---|---|
To: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql: display of object comments |
Date: | 2011-08-09 06:41:10 |
Message-ID: | 4E40D686.1090609@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
(2011/08/09 7:01), Josh Kupershmidt wrote:
>> I am a bit confused as to why we have both \det and \dE. They seem
>> redundant. Shouldn't we rip one of those out? IMHO, \det should be
>> the one to go, as it could be useful to do, e.g. \dtvE, which isn't
>> going to work with the \det syntax.
>
> Yeah, I was wondering that myself. At first I thought maybe someone
> added in one without being aware of the other, but it looks like both
> \dE and \det got added in by commit
> 0d692a0dc9f0e532c67c577187fe5d7d323cb95b. They are using different
> queries internally (pg_class vs. pg_foreign_table), but I doubt end
> users would care about that. Or perhaps the author just wanted a
> command name similar to \dew and \des.
I'm the author of that patch, sorry for confusion. May I explain the
background of implementing those command? :)
Basically, during implementing foreign table support, I tried to follow
the existing design.
I found two backslash command groups in psql, \de[wsu] and \d[tvsT],
which are relevant to foreign table. Former is a group for listing
relation (table, view, sequence and type), and they have common output
format. Users would use them (sometimes with combination like \dtv) to
list only specified type of relations. OTOH latter is a group for
listing SQL/MED objects (wrapper, server and user mapping), and commands
in that group have different output columns. Users would use them to
see detail of FDW options, maybe mainly FDW options.
They had been implemented in different ways then, and I kept
implementation similar to existing codes for each. But now, as you say,
they seem redundant and inconsistent each other.
> +1 for getting rid of one of them; I don't really care which one gets
> the axe. Though we should make sure to be able to show all possible
> columns in whichever command we keep (i.e. add "Options" column to
> \dE+ if we keep that one).
I'm not sure whether getting rid of one of them is better.
But maybe \dE is useless than \det, because former doesn't shows more
information than simple \d.
> BTW, I haven't bothered setting up
> functioning foreign tables yet, but is "Size" always going to be 0
> bytes in \dE+?
Yes, "Size" is total file size calculated with pg_table_size(), but
foreign table has no data file.
Regards,
--
Shigeru Hanada
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2011-08-09 07:26:58 | Re: Selecting user-defined CASTs |
Previous Message | Tom Lane | 2011-08-09 05:27:06 | Re: Selecting user-defined CASTs |