Open brianfoshee opened 9 years ago
@nathanprayzo Looks like we'll get a JSONB
update function in Postgres 9.5 (sometime this fall). Looking forward to doing performance benchmarks on it.
--- jsonb || jsonb (concatenate / overwrite)
SELECT '{"name": "Joe", "age": 30}'::jsonb || '{"town": "London"}'::jsonb;
?column?
----------------------------------------------
{"age": 30, "name": "Joe", "town": "London"}
(1 row)
Very nice!! On Jun 3, 2015 4:25 PM, "Brian Foshee" notifications@github.com wrote:
@nathanprayzo https://github.com/nathanprayzo Looks like we'll get a JSONB update function in Postgres 9.5 (sometime this fall). Looking forward to doing performance benchmarks on it.
--- jsonb || jsonb (concatenate / overwrite) SELECT '{"name": "Joe", "age": 30}'::jsonb || '{"town": "London"}'::jsonb; ?column?
{"age": 30, "name": "Joe", "town": "London"} (1 row)
— Reply to this email directly or view it on GitHub https://github.com/brianfoshee/aquaponics-data/issues/36#issuecomment-108605339 .
Another interesting development on that front, one that I think is more relevant for inserting new JSON objects and probably would be faster as well: http://adpgtech.blogspot.co.uk/2015/05/goodbye-jsonbreplace-hello-jsonbset.html