no-null-comparison
Use explicit NULL predicates instead of ordinary NULL comparisons.
Why
Ordinary built-in comparisons with NULL produce unknown, so a WHERE or JOIN predicate does not match rows. A scalar NOT IN list containing NULL can never be true. These expressions often silently discard the rows the query intended to retain.
Fix
Use IS NULL or IS NOT NULL to test for missing values, and IS [NOT] DISTINCT FROM for null-safe equality. Remove a literal NULL from a NOT IN list and express the intended null handling separately.
Examples
SELECT idFROM eventWHERE archived_at = NULL;SELECT idFROM eventWHERE archived_at IS NULL AND state IS DISTINCT FROM $1;