Re: How to find earlest possible start times for given duration excluding reservations

Поиск
Список
Период
Сортировка
От Andrus
Тема Re: How to find earlest possible start times for given duration excluding reservations
Дата
Msg-id B77ECACB05844A1C9E53552B312149D2@dell2
обсуждение исходный текст
Ответ на Re: How to find earlest possible start times for given duration excluding reservations  (Thom Brown <thom@linux.com>)
Список pgsql-general
Hi!

>A further tweak; add the following to the WHERE clause:
>AND EXTRACT(DOW FROM times.period) != 0

I changed it to isodow to work in any locale.

Your solution is more readable but Erwin answer in SO looks more optimized.
I have 10 workes and 1 month reservation with 15 minute offsess from 8 to
20:00, so perfomance is hopafully not an issue. Which to use ?

Using current_date in check constraint causes database restore failure.
not valid should be added or this check should be moved to holydays check
trigger.

Andrus.



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