Re: constraint via selection - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: constraint via selection
Date
Msg-id 20011117122714.M31141-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: constraint via selection  (Horst Herb <hherb@malleenet.net.au>)
List pgsql-sql
On Sun, 18 Nov 2001, Horst Herb wrote:

> > What would the most efficient formulation of the "check" constraint be
> > in this case?
>
> Sorry, I probably should reformulate my question into "is there a more
> effficient constraint than a foreign key constraint for this simple
> problem"?

Hmm, it depends.  You probably can't manage it through check constraints
unless you knew the values (at which point you might not even the other
table) since I'm pretty sure we don't support check constraints with
subselects in them. It's possible that for your application you could
manage to make a trigger that beats the foreign key constraint and
do it that way.




pgsql-sql by date:

Previous
From: "Aasmund Midttun Godal"
Date:
Subject: Re: constraint via selection
Next
From: "Aasmund Midttun Godal"
Date:
Subject: System catalogs