> Do we need to consider how this part of code inside ExecInitModifyTable() would evolve ?
> I think placing the compound condition toward the end of ExecInitModifyTable() is reasonable because it checks the latest information.
+1 for Zaihong-san's idea. But instead of rewriting every relsultRelInfo to mtstate->resultRelInfo, which makes it a bit harder to read, I'd like to suggest just adding "resultRelInfo = mtstate->resultRelInfo;" immediately before the if block.
Thanks a lot, all for helping to solve the problem quickly!