Re: creation of foreign key without checking prior data?
От | Peter Hunsberger |
---|---|
Тема | Re: creation of foreign key without checking prior data? |
Дата | |
Msg-id | cc159a4a0909171122q51e1ba7dgfcfba50cc5efb42d@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: creation of foreign key without checking prior data? (hubert depesz lubaczewski <depesz@depesz.com>) |
Ответы |
Re: creation of foreign key without checking prior data?
|
Список | pgsql-general |
On Thu, Sep 17, 2009 at 12:44 PM, hubert depesz lubaczewski <depesz@depesz.com> wrote: > On Thu, Sep 17, 2009 at 12:31:14PM -0500, Peter Hunsberger wrote: >> On Thu, Sep 17, 2009 at 11:40 AM, hubert depesz lubaczewski >> <depesz@depesz.com> wrote: >> > >> > 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? >> >> No. >> >> If you don't want the behavior of a foreign key then just don't define >> a foreign key. Load the data, clean it up, then create the foreign key > > I think you are missing the point. Data is clean. It's dump. creation of > fkey takes time, and i'd like to avoid this delay. You can't have a foreign key that doesn't have relational integrity, it is no longer a foreign key. If you don't want the delay then don't define the key, at least until some point at which you can take the delay. If there is never such a time then your operational scenario needs changing, not Postgres... -- Peter Hunsberger
В списке pgsql-general по дате отправления: