Something like this will do the job in PostgreSQL:
CREATE TABLE reservations (
item_id uuid,
duration tsrange,
EXCLUDE USING GIST (item_id WITH =, duration WITH &&)
);