Thread: system catalog constraints question

system catalog constraints question

From
"Gevik Babakhani"
Date:
Hi,

Is there a way to query the column constraints between the tables of system
catalog.
For example pg_attribute.atttypid---->pg_type.oid. This is described in the 
docs of course , but does the system use something like pg_constaint 
or the system catalog constraints are enforced only in the code?

Regards,
Gevik.




Re: system catalog constraints question

From
"Heikki Linnakangas"
Date:
Gevik Babakhani wrote:
> Is there a way to query the column constraints between the tables of system
> catalog.
> For example pg_attribute.atttypid---->pg_type.oid. This is described in the 
> docs of course , but does the system use something like pg_constaint 
> or the system catalog constraints are enforced only in the code?

There is pg_depend, which is kind of like constraints, but enforced in 
code.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


Re: system catalog constraints question

From
"Gevik Babakhani"
Date:
Thank you :) 

> -----Original Message-----
> From: Heikki Linnakangas [mailto:heikki@enterprisedb.com] 
> Sent: Monday, January 28, 2008 5:35 PM
> To: Gevik Babakhani
> Cc: pgsql-hackers@postgresql.org
> Subject: Re: [HACKERS] system catalog constraints question
> 
> Gevik Babakhani wrote:
> > Is there a way to query the column constraints between the 
> tables of 
> > system catalog.
> > For example pg_attribute.atttypid---->pg_type.oid. This is 
> described 
> > in the docs of course , but does the system use something like 
> > pg_constaint or the system catalog constraints are enforced 
> only in the code?
> 
> There is pg_depend, which is kind of like constraints, but 
> enforced in code.
> 
> -- 
>    Heikki Linnakangas
>    EnterpriseDB   http://www.enterprisedb.com
>