Re: Exclude constraint problem

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alex Zepeda <zipzippy(at)sonic(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Exclude constraint problem
Date: 2010-08-31 18:00:48
Message-ID: 1283277648.23910.6.camel@jdavis
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, 2010-08-30 at 20:06 -0400, Tom Lane wrote:
> Jeff Davis <pgsql(at)j-davis(dot)com> writes:
> > On Mon, 2010-08-30 at 19:40 -0400, Tom Lane wrote:
> >> That's really *not* supposed to happen, assuming that both machines have
> >> IEEE float arithmetic and competently written float I/O code.
>
> > On my machine I see:
>
> > => select float4in(float4out((1::numeric + 1e-7::numeric)::float4)) =
> > (1::numeric + 1e-7::numeric)::float4;
>
> You need extra_float_digits cranked up. Which pg_dump knows about.

I can't reproduce the problem with float4/8, but I still see a problem
with floating-point timestamps:

=> show integer_datetimes ;
-------------------
off
(1 row)

=> show extra_float_digits ;
--------------------
3
(1 row)

=> select timestamp_in(timestamp_out('2009-01-01'::timestamp +
'0.0000007 sec'::interval),0,-1) = ('2009-01-01'::timestamp + '0.0000007
sec'::interval);
?column?
----------
f
(1 row)

Machine is 64-bit linux, 9.1devel.

It's academic at this point, however, because Alex compiled with the
default options.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-08-31 18:13:40 Re: Exclude constraint problem
Previous Message Bruce Momjian 2010-08-31 16:33:35 Re: BUG #5632: won't unistall properly