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/