Data Dictionary

Поиск
Список
Период
Сортировка
Искать

Data Dictionary

От:
cornell mail <sjf8@cornell.edu>
Дата:
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 .

Any good pointers?

Saul


FAQ