a) the finish is after the start

well, finish > start

b) two allocations for a single vehicle don't overlap.

this one is a bit tricky !

- Check that there is no allocation in the table whose time period start, end includes either the start of the end of the reservation to insert, and that the time period of the reservation to insert does not contain either the start or end of any reservation in the table.

This is 4 selects, playing with order by limit 1 and indexes, it will be fast.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to