On Fri, Jul 22, 2011 at 12:44 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Jul 21, 2011 at 9:17 PM, Josh Kupershmidt <schmiddy@gmail.com> wrote:
>> Here's a small patch against branch 8.4 to mention support for COMMENT
>> ON index_name.column_name.
>
> I am not in favor of this - because we'd also need to mention every
> other relkind that can support comments. I think if we want to do
> something here we should change it to say relation_name, and then
> clarify what that means further down. Similarly with the patch for
> master.
>
> Also, if we're going to make a change here, we probably should make
> sure it matches the actual behavior. In master, that's to allow
> comments on columns of tables, views, composite types, and foreign
> tables.
That seems like a good way to document this; patch for master updated.
I avoided mucking with the documentation for COMMENT ON RULE and
COMMENT ON TRIGGER this time; they both say "table" when they really
mean "table or view", but maybe trying to differentiate between
"table", "table_or_view", and "relation" will make things overly
complicated.
>> Also, a patch against master to:
>> * get rid of the bogus "Description" outputs for \d+ sequence_name
>> and \d+ index_name
>
> This part looks OK, but instead of doing a negative test (not-index,
> not-sequence) let's have it do a positive test, for the same types
> comment.c allows.
Right, fixed.
>> And while I'm messing with this, some further nitpicks about psql not
>> addressed by these patches:
>> * The "Storage" column for \d+ sequence_name is correct, I suppose,
>> but repetitive
>
> I'm OK with removing that.
Hrm, would it be better to keep that Storage bit around in some
non-repetitive form, maybe on its own line below the table output?
>> * The "Type" column for \dv+ view_name, \di+ index_name, \ds+
>> sequence_name , etc. seems borderline useless.. shouldn't you know
>> what type you're looking at based on the backslash command you're
>> using?
>
> Not really. You can do something like this, for example:
>
> \dti+
>
> ...to show both indexes and tables.
I see. Didn't know about that trick.
Josh