X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9AFEED1C4D0 for ; Wed, 13 Aug 2003 13:11:39 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 14888-05 for ; Wed, 13 Aug 2003 10:10:06 -0300 (ADT) Received: from spoetnik.xs4all.nl (spoetnik.xs4all.nl [213.84.24.58]) by svr1.postgresql.org (Postfix) with ESMTP id 792D5D1C4C7 for ; Wed, 13 Aug 2003 10:11:27 -0300 (ADT) Received: by spoetnik.xs4all.nl (Postfix, from userid 1000) id 318BF3E41; Wed, 13 Aug 2003 15:11:28 +0200 (CEST) Date: Wed, 13 Aug 2003 15:11:27 +0200 From: Reinoud van Leeuwen To: pgsql-sql@postgresql.org Subject: Re: Insert a description while creating a table Message-ID: <20030813151127.O20464@spoetnik.xs4all.nl> Mail-Followup-To: pgsql-sql@postgresql.org References: <3F3A3523.4261096@rodos.fzk.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3F3A3523.4261096@rodos.fzk.de>; from ch@rodos.fzk.de on Wed, Aug 13, 2003 at 02:54:59PM +0200 X-message-flag: Warning! The sender of this mail thinks you should use a more secure email client. X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/132 X-Sequence-Number: 14748 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 descriptions Schema | Name | Object | Description --------+--------+--------+------------------------------------------------- public | object | table | The table that holds all 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 table object_def_id | integer | not null | foreign key to object_def.id name | character varying(60) | | natural name of this object superobject_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 null default '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 database user_added | character varying(20) | | username that added this record to the database date_changed | timestamp without time zone | | date this record was last changed user_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 __________________________________________________