Re: Foreign Unique Constraint

Поиск
Список
Период
Сортировка
От Jon Horsman
Тема Re: Foreign Unique Constraint
Дата
Msg-id 4f4c2a010703272051g94d88fdkc508a1b1ef189b34@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Foreign Unique Constraint  ("Phillip Smith" <phillip.smith@weatherbeeta.com.au>)
Список 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


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Re: Foreign Unique Constraint
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Foreign Unique Constraint