Re: Optimization on UPDATEs and FOREIGN KEYs... - Mailing list pgsql-general

From Tom Lane
Subject Re: Optimization on UPDATEs and FOREIGN KEYs...
Date
Msg-id 27634.1080919364@sss.pgh.pa.us
Whole thread Raw
In response to Optimization on UPDATEs and FOREIGN KEYs...  (Sean Chittenden <sean@chittenden.org>)
List pgsql-general
Sean Chittenden <sean@chittenden.org> writes:
> Does the optimizer optimize away the foreign key checks on a primary
> key if its value doesn't change, even though it's had a value assigned
> to it?

The optimizer has nothing to do with this, but in most cases the foreign
key triggers themselves will short-circuit when the key value is found
to be the same as before.

            regards, tom lane

pgsql-general by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Large DB
Next
From: Bruno Wolff III
Date:
Subject: Re: row-level security model