BUG #1591: BETWEEN NULL AND NULL causes crash
От | Michael Williamson |
---|---|
Тема | BUG #1591: BETWEEN NULL AND NULL causes crash |
Дата | |
Msg-id | 20050407193627.9B2D1F0F75@svr2.postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #1591: BETWEEN NULL AND NULL causes crash
|
Список | pgsql-bugs |
The following bug has been logged online: Bug reference: 1591 Logged by: Michael Williamson Email address: michael.williamson@caseware.com PostgreSQL version: 8.0.1 Operating system: Windows 2000 Description: BETWEEN NULL AND NULL causes crash Details: Hello, I have the following query: SELECT * FROM Entities WHERE NULL IS NULL OR (EntityNo BETWEEN NULL AND COALESCE(NULL,NULL)) This causes one of two results: postmaster crashes or goes into an infinite loop. The reason I have such a strange query is because values are filled in from a dialog. It looks more like: SELECT * FROM Entities WHERE %p1 IS NULL OR (EntityNo BETWEEN %p1 AND COALESCE(%p2,%p1)) This query executes ok on other dbs (mssql, mysql) and returns the correct result (all records). I can fix it for postgre by doing: SELECT * FROM Entities WHERE NULL IS NULL OR (EntityNo BETWEEN NULL AND COALESCE(NULL,NULL,'')) But none the less nothing should make it loop infinitely or crash. Thanks
В списке pgsql-bugs по дате отправления: