git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 36a4ac2) | patch
Fix missed step in removal of useless RESULT RTEs in the planner.
Sat, 5 Dec 2020 21:16:13 +0000 (16:16 -0500)
Sat, 5 Dec 2020 21:16:13 +0000 (16:16 -0500)
commit e98c900993e89ad9278cdfbf0ba5495381a1faac
Fix missed step in removal of useless RESULT RTEs in the planner.

Commit 4be058fe9 forgot that the append_rel_list would already be
populated at the time we remove useless result RTEs, and it might contain
PlaceHolderVars that need to be adjusted like the ones in the main parse
tree. This could lead to "no relation entry for relid N" failures later
on, when the planner tries to do something with an unadjusted PHV.

Per report from Tom Ellis. Back-patch to v12 where the bug came in.

Discussion: https://postgr.es/m/20201205173056.GF30712@cloudinit-builder
src/backend/optimizer/prep/prepjointree.c diff | blob | blame | history
src/test/regress/expected/join.out diff | blob | blame | history
src/test/regress/sql/join.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /