From: | Mike Mascari <mascarm(at)mascari(dot)com> |
---|---|
To: | "'mascarm(at)mascari(dot)com'" <mascarm(at)mascari(dot)com>, "'Norman J(dot) Clarke'" <norman(at)combimatrix(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | RE: how to see column comments? |
Date: | 2001-02-16 03:50:06 |
Message-ID: | 01C097A1.A3F27A80.mascarm@mascari.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Actually, I responded a bit too hastily. That looks like a bug in psql to
me. I see it in 7.0.3 as well. The query that psql is generating is
incorrect:
SELECT relhasindex, relkind, relchecks, reltriggers, relhasrules
FROM pg_class WHERE relname='table.column';
It should be querying pg_attribute.
It seems \d+ tablename is currently the only way to view column comments.
Hope that helps,
Mike Mascari
mascarm(at)mascari(dot)com
-----Original Message-----
From: Norman J. Clarke [SMTP:norman(at)combimatrix(dot)com]
Sent: Thursday, February 15, 2001 8:24 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] how to see column comments?
Hello,
I have not been able to get psql to show column comments in version
7.1beta4. Am I doing anything wrong, or is this a bug? A transcript of my
psql session is below.
Norm
------------------------------------------------------------------
norman=# create table test_table (col1 integer);
CREATE
norman=# comment on table test_table is 'this is a table comment';
COMMENT
norman=# \dd test_table
Object descriptions
Name | Object | Description
------------+-------------+-------------------------
test_table | relation(r) | this is a table comment
(1 row)
norman=# comment on column test_table.col1 is 'this is a column comment';
COMMENT
norman=# \dd test_table.col1
Object descriptions
Name | Object | Description
------+--------+-------------
(0 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | phillip | 2001-02-16 04:27:14 | How to use gethostbyname() |
Previous Message | Christopher Sawtell | 2001-02-16 03:42:43 | Re: how to see column comments? |