Hi,

+1 on Tom's point about BEFORE UPDATE triggers.
I also noticed that in execReplication.c, ExecSimpleRelationUpdate() passes 
CMD_INSERT to ExecConstraints():
ExecConstraints(CMD_INSERT, resultRelInfo, slot, estate);
I think this should be CMD_UPDATE?

Regards,
Yuan Li(carol)

-----邮件原件-----
发件人: Tom Lane <[email protected]> 
发送时间: 2025年12月1日 14:33
收件人: jian he <[email protected]>
抄送: PostgreSQL-development <[email protected]>
主题: Re: UPDATE run check constraints for affected columns only

jian he <[email protected]> writes:
> The attached patch implements the $subject.

Does this cover the case where a BEFORE UPDATE trigger has modified columns 
that were not mentioned in UPDATE...SET?

                        regards, tom lane


Reply via email to