brianfoshee / aquaponics-data

0 stars 0 forks source link

Backend Tasks #36

Open brianfoshee opened 9 years ago

brianfoshee commented 9 years ago
brianfoshee commented 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)

https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5?utm_source=postgresweekly&utm_medium=email#jsonb_.7C.7C_jsonb_.28concatenate_.2F_overwrite.29

nathanprayzo commented 9 years ago

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)

https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5?utm_source=postgresweekly&utm_medium=email#jsonb_.7C.7C_jsonb_.28concatenate_.2F_overwrite.29

— Reply to this email directly or view it on GitHub https://github.com/brianfoshee/aquaponics-data/issues/36#issuecomment-108605339 .

brianfoshee commented 9 years ago

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