Re: [HACKERS] Binary cursor header changed from 20 to 16 Bytes? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Binary cursor header changed from 20 to 16 Bytes?
Date
Msg-id 199908021624.MAA03205@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Binary cursor header changed from 20 to 16 Bytes?  ("G. Anthony Reina" <reina@nsi.edu>)
List pgsql-hackers
> Tom Lane wrote:
> 
> > There is *no* header overhead for binary data as far as libpq or the
> > FE/BE protocol is concerned; what you get from PQgetvalue() is just
> > a pointer to whatever the backend's internal representation of the
> > data type is.  It's certainly possible for particular data types to
> > change representation from time to time, though I didn't recall anyone
> > planning such a thing for 6.5.  What data type is the column you're
> > retrieving, anyway?  (I'm guessing float4 array, perhaps?)  What kind
> > of platform is the backend running on?
> >
> >                         regards, tom lane
> 
> Right on the money. The column being retrieved is a float4 array. I am running
> the backend on a Red Hat Linux 6.0 machine (Pentium II / 400 MHz / 512 Meg RAM /
> 128 Meg Shared buffers). The clients are all SGI machines (O2, Impact, and
> Indy).
> 

I don't think you can do binary cursors across architectures.  The
internal formats for most types are different, though you may be able to
get away with string fields and int if the endian is the same.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Michael J Schout
Date:
Subject: bytea type and precision.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Binary cursor header changed from 20 to 16 Bytes?