=?UTF-8?Q?Niklas_Hamb=C3=BCchen?= <mail@nh2.me> writes:
> we noticed that when writing a large query of form
> (((A OR B) OR C) OR ...)
> with many terms (e.g. 13000) this causes one of two errors:
> 1. memory exhausted at or near "("
> 2. stack depth limit exceeded
> ...
> We consider this a bug because it means one cannot easily generate large queries that query a couple thousand entries
ina `SELECT ... WHERE` condition.
[ shrug... ] Even if these examples didn't fail, they would perform
terribly. Limits are a fact of life. Write your query some other
way, for example using "x IN (list)" or other shortcut syntaxes.
regards, tom lane