Another important difference, that wasn't mentioned in any answer above, is that there is no equality operator for json
type, but there is one for jsonb
.
This means that you can't use DISTINCT
keyword when selecting this json
-type and/or other fields from a table (you can use DISTINCT ON
instead, but it's not always possible because of cases like this).