You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With json type it's possible to get an error org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type json
in queries like select distinct id, json_column from table_with_json;
We should avoid using json type.
Jsonb should be preferred instead
The text was updated successfully, but these errors were encountered:
-- Finds columns of type 'json'. Use 'jsonb' instead.selectt.oid::regclass::textas table_name,
col.attname::textas column_name,
col.attnotnullas column_not_null
frompg_catalog.pg_class t
joinpg_catalog.pg_namespace nsp onnsp.oid=t.relnamespacejoinpg_catalog.pg_attribute col on (col.attrelid=t.oid)
wheret.relkind='r'andcol.attnum>0and/* to filter out system columns such as oid, ctid, xmin, xmax, etc.*/col.atttypid::regtype::text='json'andnsp.nspname= :schema_name_param::textorder byt.oid::regclass::text, col.attname::text;
With json type it's possible to get an error
org.postgresql.util.PSQLException: ERROR: could not identify an equality operator for type json
in queries like
select distinct id, json_column from table_with_json;
We should avoid using json type.
Jsonb should be preferred instead
The text was updated successfully, but these errors were encountered: