lots of values for IN() clause
От | Markus Schiltknecht |
---|---|
Тема | lots of values for IN() clause |
Дата | |
Msg-id | 454A0D10.1050708@bluegap.ch обсуждение исходный текст |
Ответы |
Re: lots of values for IN() clause
Re: lots of values for IN() clause |
Список | pgsql-general |
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;"
В списке pgsql-general по дате отправления: