Re: What is the maximum length of an IN(a, b, c....d) list in PostgreSQL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: frank church <pgsql(at)adontendev(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: What is the maximum length of an IN(a, b, c....d) list in PostgreSQL
Date: 2006-01-20 18:40:06
Message-ID: 25865.1137782406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Michael Fuhr <mike(at)fuhr(dot)org> writes:
> The number of expressions. If you set max_expr_depth to 10 then
> ten 1-character values cause an error but nine 10000-character
> values should be fine (tested on my 7.4.11 system). I think the
> same applies to 8.0 and later with max_stack_depth: the limit depends
> on the number of expressions, not on the lengths of the elements.
> At least that's what my tests seem to show.

Yeah, because the limit is associated with recursion depth in expression
processing. The actual values of the strings are never on the stack,
only in the heap, so they're not going to affect it.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Joshua D. Drake 2006-01-20 18:41:59 Re: sequences not restoring properly
Previous Message Tom Lane 2006-01-20 18:38:11 Re: sequences not restoring properly