Re: How to know column constraints via system catalog tables - Mailing list pgsql-sql

From Christoph Haller
Subject Re: How to know column constraints via system catalog tables
Date
Msg-id 200311110858.JAA18912@rodos
Whole thread Raw
In response to How to know column constraints via system catalog tables  (so_excited@excite.com (Damon))
List pgsql-sql
> 
> Hi,
> 
> I need to query each column's constraint and name of a table in
> postgreSQL v7.3.4 with a single SQL query but don't know how. Would
> appreciate any pointers!
> 
> Thank you.
> 
> Regards,
> Damon
> 
select relname,conname 
from pg_constraint,pg_class 
where pg_class.oid=conrelid ;

could be start. 

Regards, Christoph 



pgsql-sql by date:

Previous
From: sad
Date:
Subject: a question to developers
Next
From: ow
Date:
Subject: Re: pg 7.4.rc1, Range query performance