postgresql/src/include/nodes
Tom Lane 34af082f95 Represent BETWEEN as a special node type in raw parse trees.
Previously, gram.y itself converted BETWEEN into AND (or AND/OR) nests of
expression comparisons.  This was always as bogus as could be, but fixing
it hasn't risen to the top of the to-do list.  The present patch invents an
A_Expr representation for BETWEEN expressions, and does the expansion to
comparison trees in parse_expr.c which is at least a slightly saner place
to be doing semantic conversions.  There should be no change in the post-
parse-analysis results.

This does nothing for the semantic issues with BETWEEN (dubious connection
to btree-opclass semantics, and multiple evaluation of possibly volatile
subexpressions) ... but it's a necessary preliminary step before we could
fix any of that.  The main immediate benefit is that preserving BETWEEN as
an identifiable raw-parse-tree construct will enable better error messages.

While at it, fix the code so that multiply-referenced subexpressions are
physically duplicated before being passed through transformExpr().  This
gets rid of one of the principal reasons why transformExpr() has
historically had to allow already-processed input.
2015-02-22 13:57:56 -05:00
..
bitmapset.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
execnodes.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
makefuncs.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
memnodes.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodeFuncs.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
nodes.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
params.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
parsenodes.h Represent BETWEEN as a special node type in raw parse trees. 2015-02-22 13:57:56 -05:00
pg_list.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
plannodes.h Fix EXPLAIN output for cases where parent table is excluded by constraints. 2015-02-17 18:04:11 -05:00
primnodes.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
print.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
readfuncs.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
relation.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
replnodes.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
tidbitmap.h Use FLEXIBLE_ARRAY_MEMBER in a bunch more places. 2015-02-20 00:11:42 -05:00
value.h Update copyright for 2015 2015-01-06 11:43:47 -05:00