Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 20, 2006 at 01:49:03AM +0000, frank church wrote:
> What is the maximum length of an IN(a,b,c....d) list in PostgreSQL?
> 
> I am using 7.4.

In 7.4 and earlier it depends on the max_expr_depth setting.

http://www.postgresql.org/docs/7.4/static/runtime-config.html#RUNTIME-CONFIG-CLIENT-OTHER

test=> SHOW max_expr_depth;
 max_expr_depth 
----------------
 10000
(1 row)

test=> SELECT 1 FROM pg_class WHERE oid IN (1,2,3,4,5,6,7,8,9,10);
 ?column? 
----------
(0 rows)

test=> SET max_expr_depth TO 10;
SET
test=> SELECT 1 FROM pg_class WHERE oid IN (1,2,3,4,5,6,7,8,9,10);
ERROR:  expression too complex
DETAIL:  Nesting depth exceeds maximum expression depth 10.
HINT:  Increase the configuration parameter "max_expr_depth".

In 8.0 and later max_expr_depth is gone and the limit depends on
max_stack_depth.

http://www.postgresql.org/docs/8.0/static/runtime-config.html#RUNTIME-CONFIG-RESOURCE

-- 
Michael Fuhr


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux