Re: Binary cursor across computers with differentarchitectures

Поиск
Список
Период
Сортировка
От G. Anthony Reina
Тема Re: Binary cursor across computers with differentarchitectures
Дата
Msg-id 3920216F.EF21AC13@nsi.edu
обсуждение исходный текст
Список pgsql-hackers
Tatsuo Ishii wrote:

> >This is interesting, but I wonder how do you handle "alignment issue"?
> In different architectures members in a structure might be aligned
> differently.  For some complex data types we need to solve the issue
> to use the cross architecture binary cursors.
> Same thing can be said for the floating format issue...
> --
> Tatsuo Ishii

I'm not quite sure what "alignment" means. The data we've been working with
have been floats (usually float4), integers (usually int4), and variable
length or fixed length arrays of both. The only "trick" is to skip the first
16 bytes in the binary cursor which we've always assumed was some sort of
header. (Of course, you also have to know the size in bytes of the datatype--
but this is always known a priori). Perhaps we've just been lucky with the
Linux-->SGI transfers. It would be interesting to know if others have tried
binary cursors across architectures. Perhaps the pitfalls show up for other
datatypes or other architectures. (?)

-Tony




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposal: replace no-overwrite with Berkeley DB
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Casting, again