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