Re: what is the date format in binary query results

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: what is the date format in binary query results
Дата
Msg-id 14027.1197446697@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: what is the date format in binary query results  (Samantha Atkins <sjatkins@mac.com>)
Список 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 по дате отправления:

Предыдущее
От: Ken Johanson
Дата:
Сообщение: Re: RETURNING clause: how to specifiy column indexes?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: what is the date format in binary query results