pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marvin Bellamy <marvin.bellamy@innovision.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: What is the binary format for timestamps?
Date: Fri, 08 Apr 2005 10:46:02 -0400
Message-ID: <14326.1112971562@sss.pgh.pa.us> (raw)
In-Reply-To: <42569606.8030503@innovision.com>
References: <4255A00F.1010409@innovision.com>
	<23104.1112917952@sss.pgh.pa.us>
	<42569606.8030503@innovision.com>

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



view thread (6+ messages)

Message-ID: <14326.1112971562@sss.pgh.pa.us>
Permalink:  ../14326.1112971562@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14326.1112971562@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marvin.bellamy@innovision.com
  Subject: Re: What is the binary format for timestamps?
  In-Reply-To: <14326.1112971562@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox