回复: UPDATE run check constraints for affected columns only - Mailing list pgsql-hackers

From li carol
Subject 回复: UPDATE run check constraints for affected columns only
Date
Msg-id KL1PR01MB6662B7FB050E34241D73956381DBA@KL1PR01MB6662.apcprd01.prod.exchangelabs.com
Whole thread Raw
In response to Re: UPDATE run check constraints for affected columns only  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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 <tgl@sss.pgh.pa.us> 
发送时间: 2025年12月1日 14:33
收件人: jian he <jian.universality@gmail.com>
抄送: PostgreSQL-development <pgsql-hackers@postgresql.org>
主题: Re: UPDATE run check constraints for affected columns only

jian he <jian.universality@gmail.com> 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



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: POC: enable logical decoding when wal_level = 'replica' without a server restart
Next
From: shveta malik
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication