Re: Short-circuiting FK check for a newly-added field

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Short-circuiting FK check for a newly-added field
Дата
Msg-id 20080521120051.GA13726@fetter.org
обсуждение исходный текст
Ответ на Short-circuiting FK check for a newly-added field  (Decibel! <decibel@decibel.org>)
Ответы Re: Short-circuiting FK check for a newly-added field
Список pgsql-general
On Tue, May 20, 2008 at 02:25:15PM -0400, Decibel! wrote:
> I need to add a field to a fairly large table. In the same alter statement
> I'd like to add a FK constraint on that new field. Is there any way to
> avoid the check of the table that the database is doing right now? The
> check is pointless because the newly added field is nothing but NULLs.
>
> This is version 8.1.mumble.

Have you tried making the FK constraint INITIALLY DEFERRED?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

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

Предыдущее
От: Ivan Sergio Borgonovo
Дата:
Сообщение: Re: Postgresql MVCC, Read Committed Isolation Level and taking "snapshot"
Следующее
От: Sim Zacks
Дата:
Сообщение: Re: Corrupted database's files (linux RAID5 + PostgreSQL 8.3.0)