title: How to add unique constraint over a time range?
body: <p>I have a table slot which has a start_time and end_time. I want no other slot to be created having the same start and end time. A unique constraint as shown in the schema below</p>
  <pre><code>CREATE TABLE slot(
  id SERIAL PRIMARY KEY,
  start_time TIMETZ NOT NULL,
  end_time TIMETZ NOT NULL,
  CONSTRAINT slot_start_end_unique UNIQUE (start_time,end_time)  
  );
  </code></pre>
  <p>can be easily bypassed by picking up one minute + or - time. I want to add a constraint so that no equivalent time slot can be created or a subset time slot cannot be created.
  I am thinking of using <code>check</code> to prevent any practically same slot from being created.
  Can anyone please point towards the right direction?</p>