CREATE TABLE reservations ( item_id uuid, duration tsrange, EXCLUDE USING GIST (item_id WITH =, duration WITH &&) );