Data Dictionary

From: cornell mail <sjf8(at)cornell(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Data Dictionary
Date: 2000-08-28 14:11:37
Message-ID: 200008281811.OAA03083@mailout1-1.nyroc.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello!

I'm new to postgresql, fairly familiar with Oracle however.

It'd be great if, in the new database I'm building, I was able to create a data
dictionary. Essentially a table that
contains meta-data for all the other tables in the database. Something like
this.

Already created table:
mytable_1
mytable_2
yourtable_3

And the data dictionary would do something like the following:

# select * from data_dict where column_name = 'mytable_1';

table_name column_name data_type nullable data_length etc...
----------------------------------------------------
mytable_1 mytable_col1 varchar Y 100
etc...
mytable_1 mytable_col2 int8 Y 18
etc....
..
..

and so on.

Is there an easy way to do this in postgresql? In oracle, all of this data is
stored in database administration
tables...are there corresponding tables in postgresql? I'd LOVE to not have to
hand-update this table, and only
have to do something like the following:

create table data_dict as select table_name, column_name, data_type, nullable,
data_length, ... from <special
posgresql table name here>.

Any good pointers?

Saul

Browse pgsql-general by date

  From Date Subject
Next Message pdaly 2000-08-28 15:24:58 Using index from sub-query
Previous Message jeff seaman 2000-08-28 12:51:39 RE: Postgresql on Solaris 8