"Day" from 8am to 3am - Mailing list pgsql-sql

From Judd Maltin
Subject "Day" from 8am to 3am
Date
Msg-id Pine.LNX.4.21.0106051900401.8090-100000@kislev.maltin.org
Whole thread Raw
Responses Re: "Day" from 8am to 3am
List pgsql-sql
Hi folks,

I have a special application that considers a playday to be from 8am to
3pm the next morning.  The system then does maintenance from 3am till 8am
(if necessary).

I'd like to ease application development by creating a new kind of
"playDay" to query from.  For example:

SELECT * FROM table WHERE timestamp IN date_trunc('playDay', timestamp);

Any ideas?
Where should I begin?  Or is this all just wrongheaded and should I put it
on the application level?

-judd



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: sql hard question
Next
From: "Hartwig Jens"
Date:
Subject: RE: Distinct Values