Re: How to find earlest possible start times for given duration excluding reservations - Mailing list pgsql-general

From Thom Brown
Subject Re: How to find earlest possible start times for given duration excluding reservations
Date
Msg-id CAA-aLv6eJTH0ibVhXZKkWdFfDFNugo5gDS7VxVVBbLwrv6Xd2w@mail.gmail.com
Whole thread Raw
In response to Re: How to find earlest possible start times for given duration excluding reservations  ("Andrus" <kobruleht2@hot.ee>)
Responses Re: How to find earlest possible start times for given duration excluding reservations  ("Andrus" <kobruleht2@hot.ee>)
List pgsql-general
On 28 October 2014 21:07, Andrus <kobruleht2@hot.ee> wrote:
Hi!
 
>A correction to this.  As it stands, it will show times like the following:
 
Thank you.
I posted your solution as alternative to Erwin answer in
 

A further tweak; add the following to the WHERE clause:

AND EXTRACT(DOW FROM times.period) != 0

This will ensure Sundays are excluded.  I don't know if you want Saturdays excluded, but you can easily adjust it for that.
 
Thom

pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: How to find earlest possible start times for given duration excluding reservations
Next
From: Jorge Arevalo
Date:
Subject: Query optimization