Skip site navigation (1) Skip section navigation (2)

Re: dictionary?

From: "Tomeh, Husam" <htomeh(at)firstam(dot)com>
To: "Ray Stell" <stellr(at)cns(dot)vt(dot)edu>,pgsql-novice(at)postgresql(dot)org
Subject: Re: dictionary?
Date: 2006-09-22 19:40:35
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
You can query pg_tables, pg_indexes, etc. 

    Select tablename from pg_tables where tablename like 'snapshot%' ; 

These views are based on the pg_class system table.

To describe a table, just do  \d tablename.


-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Ray Stell
Sent: Friday, September 22, 2006 12:16 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] dictionary?

How do you accomplish this in pg?

1. Is there a table like the Oracle dictionary?
2. Is there a way to describe a table?

I use these all the time in oracle.  When I can't remember where
some management metric is located in the system, I sort of grep for 
it based on a keyword.  For example, if I need to find out about some 
snapshot (copy of a table from another db), I do this:

select table_name from dictionary where table_name like '%SNAPSHOT%';


 Name                                      Null?    Type
 ----------------------------------------- --------
 OWNER                                     NOT NULL VARCHAR2(30)
 NAME                                      NOT NULL VARCHAR2(30)
 TABLE_NAME                                NOT NULL VARCHAR2(30)

select name from ALL_SNAPSHOTS;


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

This message contains confidential information intended only for the use of the addressee(s) named above and may contain information that is legally privileged.  If you are not the addressee, or the person responsible for delivering it to the addressee, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited.  If you have received this message by mistake, please immediately notify us by replying to the message and delete the original message immediately thereafter.

Thank you.

                                   FADLD Tag

In response to


pgsql-novice by date

Next:From: Richard Broersma JrDate: 2006-09-22 19:42:31
Subject: Re: dictionary?
Previous:From: Richard Broersma JrDate: 2006-09-22 19:28:50
Subject: Re: dictionary?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group