X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 38BC2D1B508 for ; Thu, 30 Oct 2003 19:35:41 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 12890-08 for ; Thu, 30 Oct 2003 15:35:11 -0400 (AST) Received: from trade-india.com (ns5.trade-india.com [66.234.10.13]) by svr1.postgresql.org (Postfix) with SMTP id D0F33D1B536 for ; Thu, 30 Oct 2003 15:35:09 -0400 (AST) Received: (qmail 8921 invoked from network); 30 Oct 2003 19:36:30 -0000 Received: from unknown (HELO trade-india.com) (203.145.130.142) by ns5.trade-india.com with SMTP; 30 Oct 2003 19:36:30 -0000 Message-ID: <3FA34D19.2020800@trade-india.com> Date: Sat, 01 Nov 2003 01:05:13 -0500 From: Rajesh Kumar Mallah User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Wagoner Cc: "PGSQL List (E-mail)" Subject: Re: PostgreSQL Metadata References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------010709000306080907060904" X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=BAYES_20, DATE_IN_FUTURE_24_48, EMAIL_ATTRIBUTION, HTML_20_30, IN_REP_TO, QUOTED_EMAIL_TEXT, REFERENCES, REPLY_WITH_QUOTES, USER_AGENT_MOZILLA_UA X-Spam-Level: X-Archive-Number: 200310/373 X-Sequence-Number: 10934 This is a multi-part message in MIME format. --------------010709000306080907060904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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. > --------------010709000306080907060904 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit
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:
PostgreSQL Metadata

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.


--------------010709000306080907060904--