Search Postgresql Archives

lots of values for IN() clause

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

 



Hi,

One of our PostgreSQL 8.1.5 databases constantly crashed on a certain query (backend SEGFAULTs). I've figured the crashes were caused by a very long IN() clause.

You can easily reproduce the crash by feeding the output of the python script below to your database.

Fortunately, 8.2 (as of 09/19/2006) no longer crashes. Anyway, I think it would be helpful to have at least a better error message instead of a SEGFAULT for 8.1. I didn't test earlier versions.

Regards

Markus


python script mentioned:

#!/usr/bin/python

values = 100000

print "CREATE TABLE test (a INT, b INT);"
print "SELECT a, b FROM test WHERE b IN (" + \
	",".join([str(x) for x in range(values)]) + \
	");"
print "DROP TABLE test;"


[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