When Does NULL = NULL = TRUE? 

Normally when comparing a NULL with a NULL for equality you’ll get a NULL result.

But that can be overridden with the transform_null_equals configuration parameter at the database or session level!

Example:

				
					
yugabyte=# show transform_null_equals;
 transform_null_equals
-----------------------
 off
(1 row)

yugabyte=# SELECT NULL = NULL;
 ?column?
----------

(1 row)

yugabyte=# set transform_null_equals = on;
SET

yugabyte=# SELECT NULL = NULL;
 ?column?
----------
 t
(1 row)
				
			

Have Fun!