From: | "jose' soares" <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | Michael Davis <michael(dot)davis(at)prevuenet(dot)com> |
Cc: | pgsql general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [GENERAL] Comments on tables, functions, etc. |
Date: | 1999-02-26 13:56:42 |
Message-ID: | 36D6A81A.356DB315@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Michael Davis ha scritto:
> How can I add a comment to a table, function, etc. that will should up in a
> /dd comment in psql?
pg_description has two fields...
joe=> \d pg_description
Table = pg_description
+----------------------------------+----------------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------------+-------+
| objoid | oid | 4 |
| description | text | var |
+----------------------------------+----------------------------------+-------+
To add your own description you have to know the oid of your table,function,
etc
and then assign this valuo to pg_description.objoid and your description to
pg_description.description.
Take a look:
joe=> select relname,oid from pg_class where relname='btmm';
relname| oid
-------+------
btmm |190177
(1 row)
joe=> \dd btmm
description
--------------
no description
(1 row)
joe=> insert into pg_description values(190177,'a minha tabela');
INSERT 226304 1
joe=> \dd btmm
description
--------------
a minha tabela
(1 row)
--
- Jose' -
"No other success in life can compensate for failure in the home" (David O.
McKay)
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Fleming | 1999-02-26 14:15:30 | Re: [GENERAL] SQL/Relational Design Text Book recommendations |
Previous Message | Roderick A. Anderson | 1999-02-26 13:40:27 | SQL/Relational Design Text Book recommendations |