Re: Binary tx format for an array?

Поиск
Список
Период
Сортировка
Искать
От
Michael Guyver
Тема
Re: Binary tx format for an array?
Дата
Msg-id
30b57570606220116h2f216c1eue74e5cfbb41bd5bc@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: java & endianness [Re: Binary tx format for an array?] Marc Herbert <Marc.Herbert@continuent.com>
Re: java & endianness [Re: Binary tx format for an array?] Mark Lewis <mark.lewis@mir3.com>
Thanks very much for your prompt help on this lads.

> sizeof(Oid) is 4 [bytes].  You can check this and other basic datatype
> sizes by looking in pg_type.

So in the following code

StringInfo	buf = (StringInfo) PG_GETARG_POINTER(0)
// ...
Oid element_type = pq_getmsgint(buf, sizeof(Oid));

are the bytes representing an int4 Oid simply 23, represented in variable buf as

[0x17][0x00][0x00][0x00]

The reason for asking is I'm under the impression there can be
differences between network byte-order and other representations.
Hopefully this isn't an inane question - apologies if it is.

Regards,

Michael
В списке pgsql-jdbc по дате отправления
От: Dave Cramer
Дата:
От: Sebastiaan van Erk
Дата:
Сообщение: Re: Limit vs setMaxRows issue
FAQ