Re: Deferred foreign key constraint downsides

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Jack Christensen <jackc(at)hylesanderson(dot)edu>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: Deferred foreign key constraint downsides
Date: 2011-04-08 23:21:57
Message-ID: 1302304917.25596.7.camel@jdavis-ux.asterdata.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 2011-04-08 at 14:08 -0500, Jack Christensen wrote:
> Are there any other downsides to just setting all my foreign keys to
> initially deferred?

It may consume memory resources until the transaction is complete.

Also, when it's possible to write the SQL in an order that always
maintains the integrity of the FK, then it's usually more readable and
understandable. So using immediate constraints may encourage a more
readable style.

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Carlos Mennens 2011-04-09 00:09:03 Rename or Re-Create Constraints?
Previous Message Rob Sargent 2011-04-08 22:42:52 Re: Howto sort the result of UNION (without modifying its type)?