On Thu, Feb 22, 2024 at 10:51 AM Andrei Lepikhov <a.lepik...@postgrespro.ru> wrote: > On 21/2/2024 14:26, Richard Guo wrote: > > I think the right fix for these issues is to introduce a new element > > 'sublevels_up' in ReplaceVarnoContext, and enhance replace_varno_walker > > to 1) recurse into subselects with sublevels_up increased, and 2) > > perform the replacement only when varlevelsup is equal to sublevels_up. > This code looks good. No idea how we have lost it before.
Thanks to Richard for the patch and to Andrei for review. I also find code looking good. Pushed with minor edits from me. ------ Regards, Alexander Korotkov