4 ms·
Idk, `jsonb_set` and `||` works good enough for most use cases. For reference, you can use `jsonb_set` to do stuff like: jsonb_set('{"a": [{"b": 1}]}', '{a,0,c}
by joaohaas 2y ago
Idk, `jsonb_set` and `||` works good enough for most use cases. For reference, you can use `jsonb_set` to do stuff like:
jsonb_set('{"a": [{"b": 1}]}', '{a,0,c}', '2')
I think a `||` that works with JSON patches would be nice, but you can easily implement that as an extension if you need it.
- cyberax 2y agoIt's super not great. Instead of having something like: "update blah set field->abc = '123'" you end up with "update blah set field = jsonb_set(field, 'abc', '123');". Not the end of the world, but I have to look up the syntax every time I need to write a query.