Re: How to know column constraints via system catalog tables

From: Christoph Haller <ch(at)rodos(dot)fzk(dot)de>
To: so_excited(at)excite(dot)com (Damon)
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to know column constraints via system catalog tables
Date: 2003-11-11 09:58:51
Message-ID: 200311110858.JAA18912@rodos
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message sad 2003-11-11 11:42:22 question to developers
Previous Message Holger Jakobs 2003-11-11 06:57:33 Re: transaction processing after error in statement