I'm trying to define the following exclusion-constraintalter table my_table add EXCLUDE USING gist (is_default WITH =, daterange(valid_from, valid_to, '[)') WITH &&) WHERE (is_default = true);
is_default should not be in the index as only one
value filtered on the WHERE clause.