Thread: NewBie

NewBie

From
Jérôme Kestener
Date:
I want to find the primary key of a table, but i don't know  in witch system table this information is store. I suppose that is pg_constraint, but i can't acces to it . I get the message :

Relation "pg_constraint" does not exist

Could you help me.?

My version of postgresql is 7.2.2-16 under linux suse 8

 

Re: NewBie

From
"Devinder K Rajput"
Date:

try:

psql <dbname>
\d <table_name>

The constraints will be listed at the bottom of the table.

HTH,

Devinder Rajput
Stores Division Corporate Offices
Chicago, IL
(773) 442-6474



"Jérôme Kestener" <jerome.kestener@yahoo.fr>
Sent by: pgsql-novice-owner@postgresql.org

01/21/2003 08:49 AM

       
        To:        pgsql-novice@postgresql.org
        cc:        
        Subject:        [NOVICE] NewBie



I want to find the primary key of a table, but i don't know  in witch system table this information is store. I suppose that is pg_constraint, but i can't acces to it . I get the message :

Relation "pg_constraint" does not exist

Could you help me.?

My version of postgresql is 7.2.2-16 under linux suse 8

 

Re: [May be Spam]NewBie

From
"Chad Thompson"
Date:
http://www.postgresql.org/idocs/index.php?catalogs.html shows all the catalog tables and what they are used for. 
 
I believe that you want the pg_relcheck table (http://www.postgresql.org/idocs/index.php?catalog-pg-relcheck.html)
 
HTH
Chad
----- Original Message -----
Sent: Tuesday, January 21, 2003 7:49 AM
Subject: [May be Spam][NOVICE] NewBie

I want to find the primary key of a table, but i don't know  in witch system table this information is store. I suppose that is pg_constraint, but i can't acces to it . I get the message :

Relation "pg_constraint" does not exist

Could you help me.?

My version of postgresql is 7.2.2-16 under linux suse 8

 

Re: [May be Spam]NewBie

From
"Chad Thompson"
Date:
 
http://www.postgresql.org/idocs/index.php?catalogs.html shows all the catalog tables and what they are used for. 
 
I believe that you want the pg_relcheck table (http://www.postgresql.org/idocs/index.php?catalog-pg-relcheck.html)
 
HTH
Chad Thompson
 
-----
Sent: Tuesday, January 21, 2003 7:49 AM
Subject: [May be Spam][NOVICE] NewBie

I want to find the primary key of a table, but i don't know  in witch system table this information is store. I suppose that is pg_constraint, but i can't acces to it . I get the message :

Relation "pg_constraint" does not exist

Could you help me.?

My version of postgresql is 7.2.2-16 under linux suse 8