Different types of result for coulmnName = nulll and coumnName IS NULL in PostgreSQL I have table Party with columns party_Id, party_type

When I use the below queries, I get two different types of result. 

SELECT * FROM party WHERE party_type = null


Returns nothing

SELECT * FROM party WHERE party_type IS NULL


Returns all possible rows

Need a query which should accept both null and values.
As per SQL standard, comparisons (and boolean operations) use 3-Value logic (true, false, unknown), with unknown being represented by NULL. The following expression returns unknown (represented by NULL):

party_type = null


Whereas

party_type IS NULL


will return a pure boolean (true, false).

You probably want a "NULL-safe comparison predicate":

party_type IS NOT DISTINCT FROM null


See Comparison Predicates