pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah@trade-india.com>
To: David Wagoner <dwagoner@arsenaldigital.com>
Cc: PGSQL List (E-mail) <pgsql-admin@postgresql.org>
Subject: Re: PostgreSQL Metadata
Date: Sat, 01 Nov 2003 01:05:13 -0500
Message-ID: <3FA34D19.2020800@trade-india.com> (raw)
In-Reply-To: <C6F17AC15C94D84EBEB96A7B7D59D80603207795@MONALISA.arsenaldigital.com>
References: <C6F17AC15C94D84EBEB96A7B7D59D80603207795@MONALISA.arsenaldigital.com>


Yes PostgreSQL does support COMMENTing on wide
range of objects in the same manner as Oracle.


rt3=# \h comment
Command:     COMMENT
Description: define or change the comment of an object
Syntax:
COMMENT ON
[
  TABLE object_name |
  COLUMN table_name.column_name |
  AGGREGATE agg_name (agg_type) |
  CONSTRAINT constraint_name ON table_name |
  DATABASE object_name |
  DOMAIN object_name |
  FUNCTION func_name (arg1_type, arg2_type, ...) |
  INDEX object_name |
  OPERATOR op (leftoperand_type, rightoperand_type) |
  RULE rule_name ON table_name |
  SCHEMA object_name |
  SEQUENCE object_name |
  TRIGGER trigger_name ON table_name |
  TYPE object_name |
  VIEW object_name
] IS 'text'

rt3=#


David Wagoner wrote:

> In Oracle, you can "select * from dictionary" to see the data 
> dictionary table names and descriptions.  Is there something similar 
> in PostgreSQL?
>
> Also, in Oracle you can store comments on tables and columns which 
> provides valuable metadata.  Is this also possible in PostgreSQL?  
> Here is an example create table statement in Oracle with comments:
>
>       CREATE TABLE lock_date
>        (
>         lock_id                    NUMBER(9) NOT NULL,
>         )
>         TABLESPACE data
>       /
>       -- Comments for LOCK_DATE
>       COMMENT ON TABLE lock_date IS 'Locks out data that arrives after
>       Billing and Reporting periods.'
>       /
>       -- Column Comments for LOCK_DATE
>       COMMENT ON COLUMN lock_date.lock_id IS 'Surrogate Primary Key
>       for the LOCK_DATE table.'
>       /
>
>
> Best regards,
>
> *David B. Wagoner*
> Database Administrator
> Arsenal Digital Solutions
> Web: http://www.arsenaldigital.com
>
> <<...OLE_Obj...>>
>
>
> The contents of this e-mail message may be privileged and/or 
> confidential. If you are not the intended recipient, any review, 
> dissemination, copying, distribution or other use of the contents of 
> this message or any attachment by you is strictly prohibited. If you 
> receive this communication in error, please notify us immediately by 
> return e-mail or by telephone (919-466-6700), and please delete this 
> message and all attachments from your system.
> Thank you.
>

view thread (4+ messages)

Message-ID: <3FA34D19.2020800@trade-india.com>
Permalink:  ../3FA34D19.2020800@trade-india.com/
Also on:    postgresql.org/message-id/3FA34D19.2020800@trade-india.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mallah@trade-india.com, dwagoner@arsenaldigital.com
  Subject: Re: PostgreSQL Metadata
  In-Reply-To: <3FA34D19.2020800@trade-india.com>
  References: <C6F17AC15C94D84EBEB96A7B7D59D80603207795@MONALISA.arsenaldigital.com> <3FA34D19.2020800@trade-india.com>

* 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