Re: constraint via selection

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Horst Herb <hherb(at)malleenet(dot)net(dot)au>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: constraint via selection
Date: 2001-11-17 21:06:14
Message-ID: 20011117122714.M31141-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Clayton Cottingham aka drfrog 2001-11-18 16:21:19 [OT?] permissions
Previous Message Aasmund Midttun Godal 2001-11-17 19:09:59 Re: constraint via selection