Re: what is the date format in binary query results

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Samantha Atkins <sjatkins(at)mac(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: what is the date format in binary query results
Date: 2007-12-12 08:04:57
Message-ID: 14027.1197446697@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Samantha Atkins <sjatkins(at)mac(dot)com> writes:
> This brings up a second question. How should I do byte order
> conversion for 8 byte ints? I can't use hton ntoh routines as they
> max out at 32 bits. Is there a better way?

Well, there's the PDP-endianness of odious memory, but AFAIK all current
platforms are internally consistent about the ordering of smaller and
larger pieces. Look at the float8 and int64 send/recv routines in our
current sources.

> Also, are floating point numbers guaranteed uniform?

No :-( ... although there are darn few machines anymore that don't
at least claim to follow the IEEE 754 spec.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-12-12 08:06:33 Re: what is the date format in binary query results
Previous Message Ken Johanson 2007-12-12 08:01:16 Re: RETURNING clause: how to specifiy column indexes?