Re: Trigger violates foreign key constraint - Mailing list pgsql-hackers

From Pavel Luzanov
Subject Re: Trigger violates foreign key constraint
Date
Msg-id 1e72f3dc-143a-4880-a664-a91da153ca5b@postgrespro.ru
Whole thread Raw
In response to Re: Trigger violates foreign key constraint  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Trigger violates foreign key constraint
Re: Trigger violates foreign key constraint
List pgsql-hackers
I fully support this addition to the documentation. The legal 
possibility of breaking data consistency must be documented at least.

Please, consider small suggestion to replace last sentence.

- This is not considered a bug, and it is the responsibility of the user 
to write triggers so that such problems are avoided.
+ It is the trigger programmer's responsibility to avoid such scenarios.

To be consistent with the sentence about recursive trigger calls: [1]
"It is the trigger programmer's responsibility to avoid infinite 
recursion in such scenarios."

Also I don't really like "This is not considered a bug" part, since it 
looks like an excuse.


1. https://www.postgresql.org/docs/devel/trigger-definition.html

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com




pgsql-hackers by date:

Previous
From: Xiaoran Wang
Date:
Subject: Re: [PATCH]: Not to invaldiate CatalogSnapshot for local invalidation messages
Next
From: ywgrit
Date:
Subject: Re: planner chooses incremental but not the best one