Re: Binary cursor across computers with differentarchitectures

From: "G(dot) Anthony Reina" <reina(at)nsi(dot)edu>
To: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Binary cursor across computers with differentarchitectures
Date: 2000-05-15 16:10:24
Message-ID: 3920216F.EF21AC13@nsi.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-05-15 16:16:21 Re: AW: type conversion discussion
Previous Message Tom Lane 2000-05-15 15:50:25 Re: Casting, again