On Mon, 20 Apr 2026 at 08:29, Richard Guo <[email protected]> wrote: > > I noticed a couple of issues after a further look. > > 1. The ReplaceVarsFromTargetList call on "gen_cols" fails to handle > hasSubLinks. This can cause error if targetList contains SubLinks: > > update t set a = (select max(a) from t); > ERROR: replace_rte_variables inserted a SubLink, but has noplace to record it >
Doh, yes, careless copy-and-pasting. The updates look good. > 2. The same bug fixed in this patch also exists in rule quals: > > I think we should apply the same fix to CopyAndAddInvertedQual. > Agreed. > Attached v3 fixes them. > LGTM. Regards, Dean
