creation of foreign key without checking prior data?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема creation of foreign key without checking prior data?
Дата
Msg-id 20090917164008.GA32709@depesz.com
обсуждение исходный текст
Ответы Re: creation of foreign key without checking prior data?  (Peter Hunsberger <peter.hunsberger@gmail.com>)
Список pgsql-general
Hi,
would it be possible to add a way to create foreign key without checking
of prior data?

Before you will say it's a bad idea, because then you might get invalid
data - i know. You can geet invalid data in column that is checked by
foriegn key even now - by temporarily disablnig triggers and/or writing
special (or bad) triggers.

So, since (as we know) foreign keys are not fault-proof, wouldn't it be
good to provide a way to create them without all this time-consuming
check? It would come handy for example when loading dumps (disabling
fkey for load is bad option, because you need first to create it, before
you can disable it, and to create it you need unique constraint on
referenced table, which required index - and i don't want index to be
created before data is loaded, because it's just too slow.

depesz

--
Linkedin: http://www.linkedin.com/in/depesz  /  blog: http://www.depesz.com/
jid/gtalk: depesz@depesz.com / aim:depeszhdl / skype:depesz_hdl / gg:6749007

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

Предыдущее
От: Adam Rich
Дата:
Сообщение: Re: Multiple counts on criteria - Approach to a problem
Следующее
От: Bill Moran
Дата:
Сообщение: Re: Multiple counts on criteria - Approach to a problem