ERROR: operator does not exist: json = json

From: Erik Rijkers <er(at)xs4all(dot)nl>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: ERROR: operator does not exist: json = json
Date: 2022-07-08 06:54:53
Message-ID: 267c8386-5b23-c4fd-cd5a-57fe11e42858@xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 'solved' by casting but that's not really the point)

Thanks,

Erik Rijkers

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-07-08 06:57:21 Re: Allow file inclusion in pg_hba and pg_ident files
Previous Message John Naylor 2022-07-08 06:43:32 Re: [PoC] Improve dead tuple storage for lazy vacuum