diff options
author | Tom Lane | 2016-03-10 21:23:40 +0000 |
---|---|---|
committer | Tom Lane | 2016-03-10 21:23:52 +0000 |
commit | c82c92b111b7b636e80f8a432de10c62011b35b6 (patch) | |
tree | cf0accbfe09768c55fbd19b41707f5b2c0d835af /src/include/optimizer/var.h | |
parent | fd31cd265138019dcccc9b5fe53043670898bc9f (diff) |
Give pull_var_clause() reject/recurse/return behavior for WindowFuncs too.
All along, this function should have treated WindowFuncs in a manner
similar to Aggrefs, ie with an option whether or not to recurse into them.
By not considering the case, it was always recursing, which is OK for most
callers (although I suspect that the case in prepare_sort_from_pathkeys
might represent a bug). But now we need return-without-recursing behavior
as well. There are also more than a few callers that should never see a
WindowFunc, and now we'll get some error checking on that.
Diffstat (limited to 'src/include/optimizer/var.h')
-rw-r--r-- | src/include/optimizer/var.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/include/optimizer/var.h b/src/include/optimizer/var.h index d1b0978b97e..463e75b8282 100644 --- a/src/include/optimizer/var.h +++ b/src/include/optimizer/var.h @@ -19,9 +19,11 @@ /* Bits that can be OR'd into the flags argument of pull_var_clause() */ #define PVC_INCLUDE_AGGREGATES 0x0001 /* include Aggrefs in output list */ #define PVC_RECURSE_AGGREGATES 0x0002 /* recurse into Aggref arguments */ -#define PVC_INCLUDE_PLACEHOLDERS 0x0004 /* include PlaceHolderVars in +#define PVC_INCLUDE_WINDOWFUNCS 0x0004 /* include WindowFuncs in output list */ +#define PVC_RECURSE_WINDOWFUNCS 0x0008 /* recurse into WindowFunc arguments */ +#define PVC_INCLUDE_PLACEHOLDERS 0x0010 /* include PlaceHolderVars in * output list */ -#define PVC_RECURSE_PLACEHOLDERS 0x0008 /* recurse into PlaceHolderVar +#define PVC_RECURSE_PLACEHOLDERS 0x0020 /* recurse into PlaceHolderVar * arguments */ |