Re: What is the binary format for timestamps?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: What is the binary format for timestamps?
Дата
Msg-id 23104.1112917952@sss.pgh.pa.us
обсуждение исходный текст
Ответ на What is the binary format for timestamps?  (Marvin Bellamy <marvin.bellamy@innovision.com>)
Ответы Re: What is the binary format for timestamps?
Список pgsql-interfaces
Marvin Bellamy <marvin.bellamy@innovision.com> writes:
> I'm trying to read/write timestamps as binary data, but I'm getting 
> garbage.  It looks like there are 8 bytes of timestamp data (if I read 
> the headers correctly), which I had assumed was the time in millis from 
> the PostgreSQL epoch, but my values are way off.

Are you using integer datetimes?  It should be either a float8 measured
in seconds, or an int8 measured in microseconds since the epoch.
        regards, tom lane


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

Предыдущее
От: Marvin Bellamy
Дата:
Сообщение: What is the binary format for timestamps?
Следующее
От: ljb
Дата:
Сообщение: Re: What is the binary format for timestamps?