Port Bug Report: WHERE clause crashes when comparing to a NULL value

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: WHERE clause crashes when comparing to a NULL value
Date: 1999-06-08 01:17:03
Message-ID: 199906080117.VAA06302@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Aaron Seigo
Your email address : aaron(at)moonlight(dot)ca

Category : runtime: back-end: SQL
Severity : serious

Summary: WHERE clause crashes when comparing to a NULL value

System Configuration
--------------------
Operating System : Linux 2.0.36

PostgreSQL version : 6.1.4

Compiler used : gcc 2.7.2.3

Hardware:
---------
Debian. Pentium, 128 MB

Versions of other tools:
------------------------

--------------------------------------------------------------------------

Problem Description:
--------------------
When an SQL query is made that has a WHERE clause that
compares a column with a value, and it comes to a field in
that column that has a NULL value, it crashes.

--------------------------------------------------------------------------

Test Case:
----------
SELECT * FROM table_name WHERE table_column = 'VALUE';

make sure that at least one field in table_column is NULL.

can be avoided by doing:

SELECT * FROM table_name
WHERE table_column IS NOT NULL
AND table_column = 'VALUE';

--------------------------------------------------------------------------

Solution:
---------

--------------------------------------------------------------------------

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Mark Dalphin 1999-06-08 05:10:37 IRIX6.5 Patch to Postgres 6.5 Beta (Snap Jun 7)
Previous Message Mehul J. Bhatt 1999-06-07 23:27:31 Postgres installation trouble