3 ms·
Huh. That's a little silly given the venerable HSTORE already has this capability: create table foo (d hstore); insert into foo (d) values(hstore(A
by Erwin 12y ago
Huh. That's a little silly given the venerable HSTORE already has this capability:
create table foo (d hstore);
insert into foo (d) values(hstore(ARRAY['key', 'key2'],
ARRAY['value', 'value2']));
-- "key"=>"value", "key2"=>"value2"
update foo set d = d || hstore('key', UPPER(d->'key'));
-- "key"=>"VALUE", "key2"=>"value2"
Seems like JSON / JSONB need operators to merge two objects. In fact isn't JSONB sharing the data format with the new HSTORE2?