> Hm, what are the data types of those columns? scheduletemplate_id bigint NOT NULL, period_day smallint NOT NULL, timerange timerange NOT NULL, where timerange is defined as follows: CREATE TYPE public.timerange AS RANGE ( SUBTYPE=time, SUBTYPE_OPCLASS = time_ops ); > And I assume you've got btree_gist installed? Yes, version 1.5. Regards, Ondřej Bouda