SELECT util.search_path_append('util'); SELECT util.rename_cols(:table_str, $$ occurrenceRemarks => *occurrenceRemarks, $$::hstore); SELECT mk_derived_col((:table_str, 'occurrenceRemarks'), $$_merge("*occurrenceRemarks", "dynamicProperties")$$) ; -- runtime: 1 s ("Time: 590.875 ms") @starscream