aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2023-11-04 03:30:18 +0200
committerAlexander Korotkov <akorotkov@postgresql.org>2023-11-04 03:30:18 +0200
commitec63622c03ff7be36d32c08aaa7d853856451488 (patch)
treea43f0a94c18fdf23a5890348493b6b3ab484c450 /src/backend/utils/adt/xml.c
parenta237a07d5351d7bb0afc6e0c41410d52915e47c8 (diff)
downloadpostgresql-ec63622c03ff7be36d32c08aaa7d853856451488.tar.gz
postgresql-ec63622c03ff7be36d32c08aaa7d853856451488.zip
Fix usage of the parse tree for estimate_num_groups() in set operations
recurse_set_operations() uses the parse tree for the group number estimation, because of the "varno 0" hack. At the same time 2489d76c49 made root->parse and corresponding parent_root->simple_rte_array[]->subquery distinct copies of the parse tree, while d3d55ce571 introduced self-join removal replacing relid of removed relation only in one of the copies. The present commit fixes this bug by making recurse_set_operations() call estimate_num_groups() with the copy of the parse tree processed by self-join removal. In future, we may think about maintaining just one copy of the parse tree and/or keeping removed relids as aliases. Reported-by: Zuming Jiang Bug: #18170 Discussion: https://postgr.es/m/flat/18170-f1d17bf9a0d58b24%40postgresql.org Author: Richard Guo, Alexander Korotkov Reviewed-by: Andrei Lepikhov
Diffstat (limited to 'src/backend/utils/adt/xml.c')
0 files changed, 0 insertions, 0 deletions