pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out

pgsql: Allow subquery pullup to wrap a PlaceHolderVar in another one.

2024-01-11 Thread Tom Lane
Allow subquery pullup to wrap a PlaceHolderVar in another one. The code for wrapping subquery output expressions in PlaceHolderVars believed that if the expression already was a PlaceHolderVar, it was never necessary to wrap that in another one. That's wrong if the expression is underneath an out