Em qui., 21 de nov. de 2024 às 12:02, Marcos Pegoraro <mar...@f10.com.br> escreveu:
Well, all comparisons with JSONs runs differently with null values, so maybe an example would help select f1 = f2 "JS Object Equal - Right", f1->'a' = f2->'a' "JS Value Equal - Right", f1->>'a' = f2->>'a' "Text Equal - Wrong", f1->>'a' IS NOT DISTINCT FROM f2->>'a' "Text Distinct - Right" from (Values ('{"a": 5}'::jsonb, '{"a": null}'::jsonb)) x(f1,f2) "JSON values, independently if null or not, are compared using Equal and not Equal operators, so here we don't have the IS DISTINCT operator" regards Marcos