Re: ERROR: operator does not exist: json = json

2022-07-08 Thread Andrew Dunstan
it deliberate? > This is because json is just a textual representation, and different > JSON strings can be semantically equal because e.g. whitespace and > object key order is not significant. > >> Example: >> >> select '42'::json = '{}'::json; &g

Re: ERROR: operator does not exist: json = json

2022-07-08 Thread Dagfinn Ilmari Mannsåker
s can be semantically equal because e.g. whitespace and object key order is not significant. > Example: > > select '42'::json = '{}'::json; > --> ERROR: operator does not exist: json = json > > (of course, easily 'solved' by casting but that's

ERROR: operator does not exist: json = json

2022-07-07 Thread Erik Rijkers
Hi, Comparison of 2 values of type jsonb is allowed. Comparison of 2 values of type json gives an error. That seems like an oversight -- or is it deliberate? Example: select '42'::json = '{}'::json; --> ERROR: operator does not exist: json = json (of course, easily