Comparing NULL columns to any string value does not return FALSE, it returns NULL and those rows will not participate in your result set.
postgres=# select null != ‘a string’;
postgres=# select ” != ‘a string’;
t (1 row)
What does this mean?
If you have a record where a column value is nil/NULL, and you try to do a != “some string” constraint on that column, it will not be in your result set.
Make sure you have defaults for your columns, and you aren’t leaving them blank! Even if a default is an empty string, this one weird behavior makes it worth having something there.