Thread: comment on COLUMN, broken or misunderstanding?

comment on COLUMN, broken or misunderstanding?

From
Bryce Nesbitt
Date:
I'm expecting COLUMN comments to work much like table comments, but I'm
getting nothing back.  Is this a reportable bug, or a misunderstanding?

# comment on column sched.days is 'Bitmask 0=Sunday,7=Holiday, 8=School
day, 9=Special';
COMMENT
# \dd sched.days;Schema | Name | Object | Description
--------+------+--------+-------------
(0 rows)


# comment on table sched is 'Table comment';
COMMENT
ez-sched=# \dd sched;                             Object descriptionsSchema | Name  | Object |   Description
--------+-------+--------+---------------public | sched | table  | Table comment
(1 row)

# select * from version();
PostgreSQL 8.2.6 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.2.1
(SUSE Linux)



Re: comment on COLUMN, broken or misunderstanding?

From
Tom Lane
Date:
Bryce Nesbitt <bryce1@obviously.com> writes:
> I'm expecting COLUMN comments to work much like table comments, but I'm
> getting nothing back.  Is this a reportable bug, or a misunderstanding?

> # comment on column sched.days is 'Bitmask 0=Sunday,7=Holiday, 8=School
> day, 9=Special';
> COMMENT
> # \dd sched.days;
>  Schema | Name | Object | Description
> --------+------+--------+-------------
> (0 rows)

Try "\d+ sched".  I don't think \dd considers columns at all --- what
that command would be looking for is comments on table days in schema
sched.

        regards, tom lane


Re: comment on COLUMN, broken or misunderstanding?

From
"Markus Bertheau"
Date:
2008/2/18, Bryce Nesbitt <bryce1@obviously.com>:
> I'm expecting COLUMN comments to work much like table comments, but I'm
> getting nothing back.  Is this a reportable bug, or a misunderstanding?

Try \d+ sched

Markus


Re: comment on COLUMN, broken or misunderstanding?

From
"Milen A. Radev"
Date:
Bryce Nesbitt написа:
> I'm expecting COLUMN comments to work much like table comments, but I'm
> getting nothing back.  Is this a reportable bug, or a misunderstanding?
[...]

Misunderstanding I would say - "\dd" is for objects and they are: 
'"Object" covers aggregates, functions, operators, types, relations 
(tables, views, indexes, sequences, large objects), rules, and 
triggers.' (http://www.postgresql.org/docs/8.2/static/app-psql.html, 
look for "\dd").

You could see the comment for the column with "\d+ table_name".


-- 
Milen A. Radev



Re: comment on COLUMN, broken or misunderstanding?

From
Michael Fuhr
Date:
On Sun, Feb 17, 2008 at 06:18:26PM -0800, Bryce Nesbitt wrote:
> I'm expecting COLUMN comments to work much like table comments, but I'm
> getting nothing back.  Is this a reportable bug, or a misunderstanding?
> 
> # comment on column sched.days is 'Bitmask 0=Sunday,7=Holiday, 8=School
> day, 9=Special';
> COMMENT
> # \dd sched.days;
>  Schema | Name | Object | Description
> --------+------+--------+-------------
> (0 rows)

You're using the wrong psql command.  Try "\d+ sched".

-- 
Michael Fuhr