diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-10 15:52:58 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-10 15:53:07 -0500 |
commit | 364a9f47ab363250f62dd2c381c4da435283725a (patch) | |
tree | 47e0cd694ab7d5e4ea61ae8b2a5fda55b2a97a73 /src/backend/utils/adt/selfuncs.c | |
parent | 37c54863cf71a4a1126d21db8eb68974bef34374 (diff) | |
download | postgresql-364a9f47ab363250f62dd2c381c4da435283725a.tar.gz postgresql-364a9f47ab363250f62dd2c381c4da435283725a.zip |
Refactor pull_var_clause's API to make it less tedious to extend.
In commit 1d97c19a0f748e94 and later c1d9579dd8bf3c92, we extended
pull_var_clause's API by adding enum-type arguments. That's sort of a pain
to maintain, though, because it means every time we add a new behavior we
must touch every last one of the call sites, even if there's a reasonable
default behavior that most of them could use. Let's switch over to using a
bitmask of flags, instead; that seems more maintainable and might save a
nanosecond or two as well. This commit changes no behavior in itself,
though I'm going to follow it up with one that does add a new behavior.
In passing, remove flatten_tlist(), which has not been used since 9.1
and would otherwise need the same API changes.
Removing these enums means that optimizer/tlist.h no longer needs to
depend on optimizer/var.h. Changing that caused a number of C files to
need addition of #include "optimizer/var.h" (probably we can thank old
runs of pgrminclude for that); but on balance it seems like a good change
anyway.
Diffstat (limited to 'src/backend/utils/adt/selfuncs.c')
-rw-r--r-- | src/backend/utils/adt/selfuncs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 46c95b089ed..6e75a39bf3f 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -3328,7 +3328,7 @@ estimate_num_groups(PlannerInfo *root, List *groupExprs, double input_rows, * down to ignoring the possible addition of nulls to the result set). */ varshere = pull_var_clause(groupexpr, - PVC_RECURSE_AGGREGATES, + PVC_RECURSE_AGGREGATES | PVC_RECURSE_PLACEHOLDERS); /* |