Don't constrain self-join removal due to PHVs

Alexander Korotkov <akorotkov@postgresql.org>

Commit: b5fb6736ed3b6875e2a4ca39d33325147f535137
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2023-12-24T23:33:26Z
Releases: 17.0
Don't constrain self-join removal due to PHVs

Self-join removal appears to be safe to apply with placeholder variables
as long as we handle PlaceHolderVar in replace_varno_walker() and replace
relid in phinfo->ph_lateral.

Discussion: https://postgr.es/m/18187-831da249cbd2ff8e%40postgresql.org
Author: Richard Guo
Reviewed-by: Andrei Lepikhov

Files

Discussion