Re: diary constraints

Поиск
Список
Период
Сортировка
От PFC
Тема Re: diary constraints
Дата
Msg-id op.svyd9g1mth1vuj@localhost
обсуждение исходный текст
Ответ на diary constraints  (Gary Stainburn <gary.stainburn@ringways.co.uk>)
Список pgsql-sql
> 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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Gnanavel S
Дата:
Сообщение: Re: diary constraints
Следующее
От: "A. Kretschmer"
Дата:
Сообщение: Re: diary constraints