Minor correction to Christopher Browne's post:
It is currently possible to set PostgreSQL to evaluate x = NULL as x IS
NULL.
Under the current documentations section 16.4.9.2. (Platform and Client
Compatibility):
transform_null_equals (boolean)
When turned on, expressions of the form expr = NULL (or NULL = expr) are
treated as expr IS NULL, that is, they return true if expr evaluates to the
null value, and false otherwise. The correct behavior of expr = NULL is to
always return null (unknown). Therefore this option defaults to off.
This option is set in the postgresql.conf file. Hope this helps.
Best Wishes,
Chris Travers