Re: Binary cursor across computers with differentarchitectures - Mailing list pgsql-hackers

From G. Anthony Reina
Subject Re: Binary cursor across computers with differentarchitectures
Date
Msg-id 3920216F.EF21AC13@nsi.edu
Whole thread Raw
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposal: replace no-overwrite with Berkeley DB
Next
From: Tom Lane
Date:
Subject: Re: Casting, again