Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@xxxxxxxxx

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux