Re: what is the date format in binary query results - Mailing list pgsql-general

From Tom Lane
Subject Re: what is the date format in binary query results
Date
Msg-id 14027.1197446697@sss.pgh.pa.us
Whole thread Raw
In response to Re: what is the date format in binary query results  (Samantha Atkins <sjatkins@mac.com>)
List pgsql-general
Samantha Atkins <sjatkins@mac.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

pgsql-general by date:

Previous
From: Ken Johanson
Date:
Subject: Re: RETURNING clause: how to specifiy column indexes?
Next
From: Tom Lane
Date:
Subject: Re: what is the date format in binary query results