| От | Tom Lane |
|---|---|
| Тема | Re: Binary Format of Timestamp |
| Дата | |
| Msg-id | 11303.1119939257@sss.pgh.pa.us обсуждение |
| Ответ на | Binary Format of Timestamp (Joe Joe <fondwey@yahoo.com>) |
| Список | pgsql-novice |
Joe Joe <fondwey@yahoo.com> writes:
> I expect the timestamp format to be a float8 type
> containing the seconds elapsed sind the 1.1.2000. This
> should roughly be something around 172668107, give and
> take a few timezone adjustments. What i get back from
> PQgetvalue is the following array of bytes:
> 0: 0x00
> 1: 0x00
> 2: 0x9d
> 3: 0x0a
> 4: 0x6d
> 5: 0x2e
> 6: 0x88
> 7: 0xc0
Looks to me like you are talking to a server that's using the
integer_datetimes build option, in which the timestamp format
is int8 not double, and the unit is microseconds.
regression=# select x'9d0a6d2e88c0'::int8;
int8
-----------------
172668107000000
(1 row)
regards, tom lane
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера