Re: does update of column with no relation imply a relation check of other column?

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

 



Robert Haas <robertmhaas@xxxxxxxxx> writes:
> On Wed, Oct 19, 2011 at 12:42 PM, Greg Jaskiewicz <gryzman@xxxxxxxxx> wrote:
>> When I do an insert on table B, the database check if value for column
>> ?table_a_id? exists in table A
>> But, if I do an update of column ?address? of table B, does the database
>> check again?

> I just tested this, and it seems not.

It will not, unless you update the same row more than once in a single
transaction.  If you do that, it no longer has enough information to be
sure the referencing value hasn't changed in that transaction, so it
will do a check.

			regards, tom lane

-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux