"Day" from 8am to 3am

Поиск
Список
Период
Сортировка
От Judd Maltin
Тема "Day" from 8am to 3am
Дата
Msg-id Pine.LNX.4.21.0106051900401.8090-100000@kislev.maltin.org
обсуждение исходный текст
Ответы Re: "Day" from 8am to 3am
Список 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 по дате отправления:

Предыдущее
От: "Josh Berkus"
Дата:
Сообщение: Re: sql hard question
Следующее
От: "Hartwig Jens"
Дата:
Сообщение: RE: Distinct Values