pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Reinoud van Leeuwen <reinoud.v@n.leeuwen.net>
To: pgsql-sql@postgresql.org
Subject: Re: Insert a description while creating a table
Date: Wed, 13 Aug 2003 15:11:27 +0200
Message-ID: <20030813151127.O20464@spoetnik.xs4all.nl> (raw)
In-Reply-To: <3F3A3523.4261096@rodos.fzk.de>
References: <3F3A3523.4261096@rodos.fzk.de>

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
__________________________________________________



view thread (8+ messages)  latest in thread

Message-ID: <20030813151127.O20464@spoetnik.xs4all.nl>
Permalink:  ../20030813151127.O20464@spoetnik.xs4all.nl/
Also on:    postgresql.org/message-id/20030813151127.O20464@spoetnik.xs4all.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: reinoud.v@n.leeuwen.net
  Subject: Re: Insert a description while creating a table
  In-Reply-To: <20030813151127.O20464@spoetnik.xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox