postgresql/src/backend
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
..
access Change the signature of rm_desc so that it's passed a XLogRecord. 2014-06-14 10:46:48 +03:00
bootstrap Revert "Fix bogus %name-prefix option syntax in all our Bison files." 2014-05-28 19:21:01 -04:00
catalog Fix typos in comments. 2014-06-11 19:50:29 -04:00
commands Fix typos 2014-06-12 14:01:01 -04:00
executor Improve comment for tricky aspect of index-only scans. 2014-05-06 19:27:43 -07:00
foreign Update copyright for 2014 2014-01-07 16:05:30 -05:00
lib pgindent run for 9.4 2014-05-06 12:12:18 -04:00
libpq Rename lo_create(oid, bytea) to lo_from_bytea(). 2014-06-12 15:39:09 -04:00
main Make fallback implementation of pg_memory_barrier() work. 2014-05-17 18:29:46 -04:00
nodes Avoid recursion when processing simple lists of AND'ed or OR'ed clauses. 2014-06-16 15:55:30 -04:00
optimizer Avoid recursion when processing simple lists of AND'ed or OR'ed clauses. 2014-06-16 15:55:30 -04:00
parser Avoid recursion when processing simple lists of AND'ed or OR'ed clauses. 2014-06-16 15:55:30 -04:00
po Translation updates 2014-05-10 22:16:59 -04:00
port Fix typos in comments. 2014-06-11 19:50:29 -04:00
postmaster Save pg_stat_statements statistics file into $PGDATA/pg_stat directory at shutdown. 2014-06-04 12:09:45 +09:00
regex pgindent run for 9.4 2014-05-06 12:12:18 -04:00
replication Consistency improvements for slot and decoding code. 2014-06-12 13:33:27 +02:00
rewrite pgindent run for 9.4 2014-05-06 12:12:18 -04:00
snowball Fix ancient encoding error in hungarian.stop. 2014-06-10 22:48:16 -04:00
storage Add defenses against running with a wrong selection of LOBLKSIZE. 2014-06-05 11:31:06 -04:00
tcop Set the process latch when processing recovery conflict interrupts. 2014-06-03 14:02:54 +02:00
tsearch pgindent run for 9.4 2014-05-06 12:12:18 -04:00
utils Improve tuplestore's error messages for I/O failures. 2014-06-12 18:59:06 -04:00
.gitignore Add gitignore for mingw/cygwin build outputs 2011-06-09 18:11:47 +02:00
Makefile Get rid of use of dlltool in Mingw builds. 2014-02-11 12:56:20 -05:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
nls.mk Add libpgcommon to backend gettext source files 2013-10-19 13:49:05 -04:00