Assuming the following index:
CREATE INDEX CONCURRENTLY blocked_date_idx_on_since_until_range
ON blocked_date
USING gist(
tstzrange(
"blocked_since",
"blocked_until",
'[]'
)
);
Which is a range on 2 dates, I'd like to:
ALTER TABLE blocked_date
ADD CONSTRAINT blocked_date_since_until_overlap
EXCLUDE
USING INDEX blocked_date_idx_on_since_until_range WITH &&;
This syntax is not valid (I get an error), but I can't find a valid one where I can specify which operator to use on the index. What is the right syntax for the ALTER TABLE part?