postgresql/src/include/nodes
Tom Lane 2146f13408 Avoid recursion when processing simple lists of AND'ed or OR'ed clauses.
Since most of the system thinks AND and OR are N-argument expressions
anyway, let's have the grammar generate a representation of that form when
dealing with input like "x AND y AND z AND ...", rather than generating
a deeply-nested binary tree that just has to be flattened later by the
planner.  This avoids stack overflow in parse analysis when dealing with
queries having more than a few thousand such clauses; and in any case it
removes some rather unsightly inconsistencies, since some parts of parse
analysis were generating N-argument ANDs/ORs already.

It's still possible to get a stack overflow with weirdly parenthesized
input, such as "x AND (y AND (z AND ( ... )))", but such cases are not
mainstream usage.  The maximum depth of parenthesization is already
limited by Bison's stack in such cases, anyway, so that the limit is
probably fairly platform-independent.

Patch originally by Gurjeet Singh, heavily revised by me
2014-06-16 15:55:30 -04:00
..
bitmapset.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
execnodes.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
makefuncs.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
memnodes.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
nodeFuncs.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
nodes.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
params.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
parsenodes.h Avoid recursion when processing simple lists of AND'ed or OR'ed clauses. 2014-06-16 15:55:30 -04:00
pg_list.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
plannodes.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
primnodes.h Avoid recursion when processing simple lists of AND'ed or OR'ed clauses. 2014-06-16 15:55:30 -04:00
print.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
readfuncs.h Update copyright for 2014 2014-01-07 16:05:30 -05:00
relation.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replnodes.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
tidbitmap.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
value.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00