What is the binary format for timestamps?

From: Marvin Bellamy <marvin(dot)bellamy(at)innovision(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: What is the binary format for timestamps?
Date: 2005-04-07 21:03:11
Message-ID: 4255A00F.1010409@innovision.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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. I wrote what I thought
was valid data to my timestamp columns, but my queries in the psql
console show (epoch?) for each one. When I read the binary content
back, I'd expect to get 0s, but I get some non-zero values.

--
Marvin Keith Bellamy
Software Engineer
Innovision Corporation
913.438.3200

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2005-04-07 23:52:32 Re: What is the binary format for timestamps?
Previous Message Michael Fuhr 2005-04-05 03:39:33 Re: libpq and referencing data type OIDs