Re: Foreign Unique Constraint - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Foreign Unique Constraint
Date
Msg-id 200703281108.08697.peter_e@gmx.net
Whole thread Raw
In response to Re: Foreign Unique Constraint  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
Responses Re: Foreign Unique Constraint  ("Jon Horsman" <horshaq@gmail.com>)
Re: Foreign Unique Constraint  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
List pgsql-sql
Am Mittwoch, 28. März 2007 00:17 schrieb Phillip Smith:
> Perhaps this...? It would work, but depending how many rows are in the
> table, it could become incredibly slow.
>
> ALTER TABLE table1 ADD CHECK (extension NOT IN (SELECT extension FROM
> table2));

Subqueries are not allowed in check constraints.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-sql by date:

Previous
From: "Jon Horsman"
Date:
Subject: Re: Foreign Unique Constraint
Next
From:
Date:
Subject: Re: Regular Expressions [progress]