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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Markus Schiltknecht <markus(at)bluegap(dot)ch>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Date: 2007-09-17 16:27:59
Message-ID: 28973.1190046479@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Markus Schiltknecht <markus(at)bluegap(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Markus Schiltknecht 2007-09-17 16:36:38 Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Previous Message Markus Schiltknecht 2007-09-17 15:29:55 Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable

Browse pgsql-hackers by date

  From Date Subject
Next Message Markus Schiltknecht 2007-09-17 16:36:38 Re: [COMMITTERS] pgsql: Fix up text concatenation so that it accepts all the reasonable
Previous Message Andrew Hammond 2007-09-17 16:20:38 Re: database diagram