I have table where one of the fields is JSON array. I need to append received JSON array into that field without overriding existing values.
Something like that:
CREATE OR REPLACE FUNCTION add_array(
array_received json[])
RETURNS void AS
$BODY$
update table set _array_field = _array_field | array_received ...;
$BODY$
LANGUAGE plpgsql VOLATILE;