From: | "Jon Horsman" <horshaq(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Foreign Unique Constraint |
Date: | 2007-03-28 03:51:35 |
Message-ID: | 4f4c2a010703272051g94d88fdkc508a1b1ef189b34@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
> Perhaps this...? It would work, but depending how many rows are in the
> table, it could become incredibly slow.
The max rows in either table would be about 1000 or so, which isn't
too many. There also should be a hole lot of inserting going on.
> ALTER TABLE table1 ADD CHECK (extension NOT IN (SELECT extension FROM
> table2));
I guess this is the functionality i was looking for but was hoping
there would be a cleaner way to do it.
Anyways, thanks to everyone who replied. I'll look into each of the
proposed solutions to see what best suits my needs. If anyone has a
different solution i'd still like to hear it.
Jon
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2007-03-28 09:08:07 | Re: Foreign Unique Constraint |
Previous Message | Phillip Smith | 2007-03-27 22:17:00 | Re: Foreign Unique Constraint |