Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Date
Msg-id 28973.1190046479@sss.pgh.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable  (Markus Schiltknecht <markus@bluegap.ch>)
Responses Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
List pgsql-hackers
Markus Schiltknecht <markus@bluegap.ch> writes:
> Tom Lane wrote:
>> I think you'd be nuts to bet your data on the binary representations
>> really being cross-platform compatible.

> Can you elaborate on this? AFAICT the send/recv functions use network 
> byte ordering. What are the other problems between different architectures?

Well, you're probably fine with integers and text, but beyond that it
gets a bit more dicey.  I wouldn't want to assume that floats are
compatible across any random pair of architectures, and in the more
complex datatypes (such as arrays or geometric types) there might be
some impact from alignment rules.  (Or not, I'm too lazy to go look at
the moment.)

In any one situation you can doubtless find out by testing whether
you've got a problem.  I'm just nervous about a blithe suggestion that
someone could build a cross-platform backup solution this way.  That
sounds like a recipe for getting burnt and not finding out till it's
too late to fix it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Andrew Hammond"
Date:
Subject: Re: database diagram
Next
From: Markus Schiltknecht
Date:
Subject: Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable