pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Haller <ch@rodos.fzk.de>
To: so_excited@excite.com
Cc: pgsql-sql@postgresql.org
Subject: Re: How to know column constraints via system catalog tables
Date: Tue, 11 Nov 2003 9:58:51 MET
Message-ID: <200311110858.JAA18912@rodos> (raw)
In-Reply-To: <159c8bc6.0311050100.8b65b87@posting.google.com>

> 
> 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 




view thread (5+ messages)  latest in thread

Message-ID: <200311110858.JAA18912@rodos>
Permalink:  ../200311110858.JAA18912@rodos/
Also on:    postgresql.org/message-id/200311110858.JAA18912@rodos

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ch@rodos.fzk.de, so_excited@excite.com
  Subject: Re: How to know column constraints via system catalog tables
  In-Reply-To: <200311110858.JAA18912@rodos>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox