We have a case in Postgres where
where p.is_ready_for_submission != 'N'
is failing to include NULL as a satisfying value for this condition. The column is_ready_for_submission
can be NULL
, Y
, N
. The purpose of the statement above is to include NULL
and Y
. But the NULLs are not included (they were in Oracle).
The only way to achieve this was to re-write as
(p.is_ready_for_submission is null or p.is_ready_for_submission = 'Y')
Is this special to Postgres? Note: this happens with both !=
and <>
.