Re: Fractions of seconds in timestamps
| От | rihad |
|---|---|
| Тема | Re: Fractions of seconds in timestamps |
| Дата | |
| Msg-id | 4F96C4EE.5060707@mail.ru обсуждение исходный текст |
| Ответ на | Fractions of seconds in timestamps (rihad <rihad@mail.ru>) |
| Список | pgsql-general |
On 04/24/2012 07:51 PM, rihad 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? > Answering to myself: depends on how timestamp was defined at table creation time time, timestamp, and interval accept an optional precision value p which specifies the number of fractional digits retained in the seconds field. By default, there is no explicit bound on precision. The allowed range of p is from 0 to 6 for the timestamp and interval types.. As the columns in question were explicitly created as timestamp(0) in the database, they store no fractional part, so no matter at which moment during the 59-th second the column is updated, it's always exactly 59-th.
В списке pgsql-general по дате отправления: