Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux