top | item 22767490 (no title) woutgaze | 6 years ago 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 &&) ); discuss order hn newest nicoburns|6 years ago Can this be made to work if the `id` and `duration` are in different tables (with a joining key)?
nicoburns|6 years ago Can this be made to work if the `id` and `duration` are in different tables (with a joining key)?
nicoburns|6 years ago