SELECT util.search_path_append('util'); SELECT mk_derived_col((:table_str, 'locationRemarks'), $$_alt("locationRemarks_1", "locationRemarks_2")$$); -- _alt() is fine because only one of these is ever populated