Re: What is the binary format for timestamps?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marvin Bellamy <marvin(dot)bellamy(at)innovision(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: What is the binary format for timestamps?
Date: 2005-04-08 14:46:02
Message-ID: 14326.1112971562@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Marvin Bellamy <marvin(dot)bellamy(at)innovision(dot)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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Vlad 2005-04-08 18:12:31 Re: [Dbdpg-general] benchmarking old Pg and DBD::Pg
Previous Message Marvin Bellamy 2005-04-08 14:32:38 Re: What is the binary format for timestamps?