Search Postgresql Archives

UPDATE column without FK fires other FK triggers constraint check

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

 



I was analyzing an update function and i have noticed "Trigger for constraint" entries for foreign keys that i wasn't using or referring.
After some tests it seems that this happens when the same row is covered by more than 1 update in the same transaction even without any change.

Here is a dbfiddle example:
http://dbfiddle.uk/?rdbms=postgres_9.6&fiddle=368289a7338031b8a7b7a90f0fd25d7c

Is this an expected behavior? Why it happens?

I have initially asked this on dba stackexchange:
https://dba.stackexchange.com/questions/180012/

[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