Re: [HACKERS] JSONB - JSONB operator feature request

2017-07-19 Thread david . turon
Hi, hstore have only key-value pairs, but in json can have same behavior - only equal objects are removed: SELECT '{"a": 1, "b": {"c": 2}}'::JSONB - '{"a": 1, "b": {"c": 3}}'::JSONB '{"b": {"c": 2}}' SELECT '{"a": 1, "b": {"c": 2}}'::JSONB - '{"a": 2, "b": {"c": 2}}'::JSONB '{"a": 1}'

[HACKERS] JSONB - JSONB operator feature request

2017-07-18 Thread david . turon
Hi, some users and me used hstore - hstore for example storing only changed rows in trigger like: hsore(NEW) - hstore(OLD) There isn't same operator/function in JSON/JSONB. We can only remove keys from JSONB, but not equal key-value pairs. Is there any chance to have same feature with