]> granicus.if.org Git - postgresql/commit
Fix estimate_num_groups() to not fail on PlaceHolderVars, per report from
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Apr 2009 19:46:33 +0000 (19:46 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 19 Apr 2009 19:46:33 +0000 (19:46 +0000)
commit1d97c19a0f748e94b9582dcbaec33ad74be062f9
treedc701c3e1de608b76284d5ac34e7566c4b7a8b56
parent3a624e9200bbd8b88d7724e1448fe530f32e2c3c
Fix estimate_num_groups() to not fail on PlaceHolderVars, per report from
Stefan Kaltenbrunner.  The most reasonable behavior (at least for the near
term) seems to be to ignore the PlaceHolderVar and examine its argument
instead.  In support of this, change the API of pull_var_clause() to allow
callers to request recursion into PlaceHolderVars.  Currently
estimate_num_groups() is the only customer for that behavior, but where
there's one there may be others.
12 files changed:
src/backend/catalog/heap.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/equivclass.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/util/placeholder.c
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/var.c
src/backend/utils/adt/selfuncs.c
src/include/optimizer/var.h