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)
commit37707776e0c1b8cb08230fae6ba3c2130050ef8d
treefcdf8a34b0890f5bd1d13536910c0adc6a89d658
parentbfe6495964181447c9f6a973a70f1e28eb6fb101
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