Re: Insert a description while creating a table - Mailing list pgsql-sql
| From | Reinoud van Leeuwen |
|---|---|
| Subject | Re: Insert a description while creating a table |
| Date | |
| Msg-id | 20030813151127.O20464@spoetnik.xs4all.nl Whole thread Raw |
| In response to | Re: Insert a description while creating a table (Christoph Haller <ch@rodos.fzk.de>) |
| List | pgsql-sql |
On Wed, Aug 13, 2003 at 02:54:59PM +0200, Christoph Haller wrote:
> \dd test shows
>
> Object descriptions
> Schema | Name | Object | Description
> --------+------+--------+-------------
> (0 rows)
>
> This is odd. OK, I know the doc says
> \dd [ pattern ]
>
> Shows the descriptions of objects matching the pattern, or of all
> visible objects if no argument is given. But in either case,
> only objects that have a description are listed. ("Object" covers
> aggregates, functions, operators, types, relations (tables, views,
> indexes, sequences, large objects), rules, and triggers.) For
> example:
>
> Nothing about columns.
> But what is the purpose of comments on columns if you can only get them
> via
> select * from pg_description where
Have you tried \d+ tablename? (sorry for the long lines ";-)
drbob=# \dd object Object descriptionsSchema | Name | Object |
Description
--------+--------+--------+-------------------------------------------------public | object | table | The table that
holdsall instances of objects.
(1 row)
drbob=# \d+ object
Table "public.object" Column | Type |
Modifiers |
Description
------------------+-----------------------------+----------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------id
| integer | not null default
nextval('shared_ids'::text) | (global) unique ID for this tableobject_def_id | integer | not
null
| foreign key to object_def.idname | character varying(60) |
| natural name of this objectsuperobject_id | integer |
| foreign key to object.id. This field is only filled in when the this
object is a subobject of another object (EG a port in a router)subobject_def_id | integer |
| foreign key to subobject_def.id. This field is only filled in when this
object is a subobject of another object (EG a port in a router)has_subobject | boolean | not
nulldefault 'FALSE'
| boolean indicating that this object instance has subobjects (EG router
that has ports)date_added | timestamp without time zone |
| date this record was added to the databaseuser_added | character varying(20) |
| username that added this record to the databasedate_changed | timestamp without time zone |
| date this record was last changeduser_changed | character varying(20) |
| username that made the last change to this record
Indexes: pk_object primary key btree (id), object_pk unique btree (id), object_object_def_fk btree
(object_def_id), object_object_fk btree (superobject_id), object_subobject_def_fk btree
(subobject_def_id)
Triggers: tdb_object, tiua_object, tiub_object
--
__________________________________________________
"Nothing is as subjective as reality"
Reinoud van Leeuwen reinoud.v@n.leeuwen.net
http://www.xs4all.nl/~reinoud
__________________________________________________