Re: Timestamp precision

Поиск
Список
Период
Сортировка
От John D. Burger
Тема Re: Timestamp precision
Дата
Msg-id EA214ECE-5907-4C4A-B3FB-7F04AC07C759@mitre.org
обсуждение исходный текст
Ответ на Timestamp precision  (Stéphane Schildknecht<stephane.schildknecht@postgresqlfr.org>)
Ответы Re: Timestamp precision  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
> Note:  When timestamp values are stored as double precision
> floating-point numbers (currently the default), the effective limit of
> precision may be less than 6. timestamp values are stored as seconds
> before or after midnight 2000-01-01. Microsecond precision is achieved
> for dates within a few years of 2000-01-01, but the precision degrades
> for dates further away. When timestamp values are stored as eight-byte
> integers (a compile-time option), microsecond precision is available
> over the full range of values.

I think this variance in precision is actually kind of cool - any
thought to allowing the "center" of the range to be a build-time
option?  That is, any particular application might want more
precision at a custom center.  Does this involve changing more than
that one constant?

Hmm, except if the timestamp "anchor" is installation-specific, then
binary exchange of timestamps is complicated.  What does libpq do now
with timetamps, if the client requests data in binary form?  How does
the client know whether it's getting floats or integers?

- John D. Burger
   MITRE



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Oracle to PSQL function
Следующее
От: Oisin Glynn
Дата:
Сообщение: Re: Oracle to PSQL function