Обсуждение: Port Bug Report: WHERE clause crashes when comparing to a NULL value
============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Aaron Seigo Your email address : aaron@moonlight.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: --------- --------------------------------------------------------------------------
Re: [PORTS] Port Bug Report: WHERE clause crashes when comparing to a NULL value
От
Thomas Lockhart
Дата:
> Summary: WHERE clause crashes when comparing to a NULL value > Operating System : Linux 2.0.36 > PostgreSQL version : 6.1.4 > Compiler used : gcc 2.7.2.3 > 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. What version of Postgres are you running?? v6.1.4 is either way too old or is not the version you have. Also, please post a reproducible (small) case; the problem is not reproducible here. - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California