NHVZFKZDPQGCZ6UOVQU5U3Q3SOAKGOGZNFIE7C6IB6YP3ZS4VVDAC
create or replace function idk() returns trigger as $$ begin
new.open = (select range_agg(x, true, true) from unnest(new.open) as t(x));
if cardinality(new.open) = 0 then
new.open = null;
end if;
return new;
end $$ language plpgsql volatile;
--drop trigger if exists idk_trigger on store;
create trigger idk_trigger before insert or update on store for each row execute function idk();