From: | "Michael Williamson" <michael(dot)williamson(at)caseware(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #1591: BETWEEN NULL AND NULL causes crash |
Date: | 2005-04-07 19:36:27 |
Message-ID: | 20050407193627.9B2D1F0F75@svr2.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged online:
Bug reference: 1591
Logged by: Michael Williamson
Email address: michael(dot)williamson(at)caseware(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Enrico Weigelt | 2005-04-08 01:05:32 | Re: float conversion / presentation problem ? |
Previous Message | David Fetter | 2005-04-07 16:10:10 | Re: float conversion / presentation problem ? |