Re: Datetime
От | Tom Lane |
---|---|
Тема | Re: Datetime |
Дата | |
Msg-id | 23178.1091546009@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Datetime (Michael Glaesemann <grzm@myrealbox.com>) |
Ответы |
Re: Datetime
|
Список | pgsql-sql |
Michael Glaesemann <grzm@myrealbox.com> writes: > No. I'm just saying that PostgreSQL does not represent or store > timestamps as epoch timestamps internally. You're wrong. It's not exactly Unix-like because we use a different epoch date (2000-1-1 not 1970-1-1) but the concept is just the same: what's stored is the number of seconds before or after the epoch. The default is to store this as a double precision number (hence supporting fractional seconds, with a machine-dependent amount of precision) but you can compile the server to use 64-bit integers instead. In that case the integer value actually represents microseconds before or after the epoch, and so the precision is fixed at microseconds. What you see when you display the value is an external textual representation, not the internal form. This is generally true for all Postgres datatypes except text/varchar/char ... regards, tom lane
В списке pgsql-sql по дате отправления: