title: Can a multi-field UNIQUE constraint include fields from more than one table?
body: <p>I have the following 2 tables:</p>
  
  <pre><code>Bookings
    - User ID
  
  Shifts
    - Booking ID
    - Date
  </code></pre>
  
  <p>I'd like to make sure that a user isn't booked in more than one shift on the same date. In other words, a UNIQUE constraint for fields [Bookings.UserID, Shifts.date]</p>
  
  <p>Can I do this in PostgreSQL?</p>