Re: Fractions of seconds in timestamps

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: Fractions of seconds in timestamps
Дата
Msg-id jn86uh$n42$2@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на Fractions of seconds in timestamps  (rihad <rihad@mail.ru>)
Ответы Re: Fractions of seconds in timestamps
Список pgsql-general
On 2012-04-24, rihad <rihad@mail.ru> wrote:
> As PostgreSQL stores timestamps with a fractional part, does it mean that
> WHERE f BETWEEN '2012-04-23 00:00:00' AND '2012-04-23 23:59:59' might miss
> records with values of f equal to 23:59:59.1234 or so?

yes, it does. BETWEEN doesn't work well for timestamps.
you have to do it the long way

   f >= '2012-04-23 00:00:00' AND f < '2012-04-24 00:00:00'



--
⚂⚃ 100% natural

В списке pgsql-general по дате отправления:

Предыдущее
От: Toby Corkindale
Дата:
Сообщение: Bug? Query plans / EXPLAIN using gigabytes of memory
Следующее
От: Valentin Militaru
Дата:
Сообщение: Re: Fractions of seconds in timestamps