Re: [HACKERS] case bug? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] case bug?
Date
Msg-id 20727.937683437@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] case bug?  (Keith Parks <emkxp01@mtcc.demon.co.uk>)
Responses Re: [HACKERS] case bug?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Keith Parks <emkxp01@mtcc.demon.co.uk> writes:
> Then I tried inserting a NULL into the table, which the
> case statement then treated as 0 and not null.

This is a bug: the test expressions i < 0 etc are actually returning
NULL, but ExecEvalCase is failing to check for a NULL condition result.
It should treat a NULL as false, I expect, just as WHERE does.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Notice: heap_open/close changes committed
Next
From: Tom Lane
Date:
Subject: Why do we need pg_vlock?