aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/functions.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-11-29 10:52:44 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2022-11-29 10:52:44 -0500
commit51dfaa0b010c1efba8a4137cfccd5fbb7f5d4afd (patch)
tree1d271968b968717264c1e718614a1b9b622f2c2d /src/backend/executor/functions.c
parentad86d159b6ab90b195b06fb5c7b593900a7f9cd8 (diff)
downloadpostgresql-51dfaa0b010c1efba8a4137cfccd5fbb7f5d4afd.tar.gz
postgresql-51dfaa0b010c1efba8a4137cfccd5fbb7f5d4afd.zip
Remove bogus Assert and dead code in remove_useless_results_recurse().
The JOIN_SEMI case Assert'ed that there are no PlaceHolderVars that need to be evaluated at the semijoin's RHS, which is wrong because there could be some in the semijoin's qual condition. However, there could not be any references further up than that, and within the qual there is not any way that such a PHV could have gone to null yet, so we don't really need the PHV and there is no need to avoid making the RHS-removal optimization. The upshot is that there's no actual bug in production code, and we ought to just remove this misguided Assert. While we're here, also drop the JOIN_RIGHT case, which is dead code because reduce_outer_joins() already got rid of JOIN_RIGHT. Per bug #17700 from Xin Wen. Uselessness of the JOIN_RIGHT case pointed out by Richard Guo. Back-patch to v12 where this code was added. Discussion: https://postgr.es/m/17700-2b5c10d917c30687@postgresql.org
Diffstat (limited to 'src/backend/executor/functions.c')
0 files changed, 0 insertions, 0 deletions