Comment 1 for bug 925169

Revision history for this message
Mike Rylander (mrylander) wrote :

I agree with the assessment that the restriction is unnecessary, and I think I can shed some light on why it's there.

IIRC, the point was to show "hot" reservations, those that had events occur "today". Another reason may be to limit the number of reservations the function would return, but that's unlikely because the way it was 1) couldn't guarantee that and 2) would be a very heavy handed way to do it.

As a side note, I noticed an opportunity for a little refactoring. The naive_start_of_day() sub could be replaced with the string 'today', which Postgres will interpret in the way that the sub intends.

Thanks, Lebbeous!