Re: array_to_string return is different between Windows and Linux systems

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Pascal Lequeux <plequeux(at)zti(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: array_to_string return is different between Windows and Linux systems
Date: 2007-01-23 09:01:21
Message-ID: 20070123090121.GD14759@svr2.hagander.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 23, 2007 at 09:23:06AM +0100, Pascal Lequeux wrote:
> Hi all,
>
> The *array_to_string *function used to compare the content of arrays of
> doubles doesn't return the same result if the OS is Windows or if it is
> a Linux system.
>
> Here is an example using the same table content:
> Result 1: "0,0.000263,*8e-06*,*8e-06*,0.000146,0.000321" [PostgreSQL
> 8.0.4 (redhat) or 8.1.5 (OpenSuse 10.2)]
> Result 2: "0,0.000263,*8e-006*,*8e-006*,0.000146,0.000321" [PostgreSQL
> 8.1.4, 8.1.5 or 8.1.6 (Windows)]
> The string compare fails!
>
> Is there a way to fix the exponent size ?

AFAIK, no. This is based on the operating system C library. It differs
between some other platforms as well IIRC - there are exceptions in the
regression tests for this.

//Magnus

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2007-01-23 09:41:43 Re: too many trigger records found for relation "item" -
Previous Message Magnus Hagander 2007-01-23 08:59:51 Re: Problems compiling from source