Re: What is the binary format for timestamps? - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: What is the binary format for timestamps?
Date
Msg-id 14326.1112971562@sss.pgh.pa.us
Whole thread Raw
In response to Re: What is the binary format for timestamps?  (Marvin Bellamy <marvin.bellamy@innovision.com>)
List pgsql-interfaces
Marvin Bellamy <marvin.bellamy@innovision.com> writes:
> I've been treating the timestamp as an integer, not a double.  What's a 
> good way to deal with double/float byte ordering when reading/writing 
> data from Windows applications?

Pretend it's an integer for long enough to byte-swap it the same way as
you'd do for an integer of the same size.  (IIRC this is exactly how the
backend does it, too.)
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Marvin Bellamy
Date:
Subject: Re: What is the binary format for timestamps?
Next
From: Vlad
Date:
Subject: Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg