From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-sql@postgresql.org
Cc: Phillip Smith <phillip.smith@weatherbeeta.com.au>
Cc: 'Jon Horsman' <horshaq@gmail.com>
Subject: Re: Foreign Unique Constraint
Date: Wed, 28 Mar 2007 11:08:07 +0200
Message-ID: <200703281108.08697.peter_e@gmx.net> (raw)
In-Reply-To: <002501c770bd$a42f94a0$9b0014ac@wbaus090>
References: <002501c770bd$a42f94a0$9b0014ac@wbaus090>
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/
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: peter_e@gmx.net, phillip.smith@weatherbeeta.com.au, horshaq@gmail.com
Subject: Re: Foreign Unique Constraint
In-Reply-To: <200703281108.08697.peter_e@gmx.net>
* 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