Re: deferred foreign keys

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Vivek Khera <khera(at)kcilink(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: deferred foreign keys
Date: 2004-01-02 04:57:09
Message-ID: 3FF4FA25.7050802@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> One more question: does the FK checker know to skip checking a
> constraint if the column in question did not change during an update?
>
> That is, if I have a user table that references an owner_id in an
> owners table as a foreign key, but I update fields other than owner_id
> in the user table, will it still try to verify that owner_id is a
> valid value even though it did not change?
>
> I'm using PG 7.4.

As of 7.4, yes the check is skipped.

Chris

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mike Glover 2004-01-02 06:16:30 Re: Very slow update + not using clustered index
Previous Message Tom Lane 2004-01-02 04:06:11 Re: Very slow update + not using clustered index