Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] BUG #2846: inconsistent and confusing

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Roman Kononov <kononov195-pgsql(at)yahoo(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #2846: inconsistent and confusing
Date: 2006-12-28 01:45:33
Message-ID: 200612280145.kBS1jXS17301@momjian.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Roman Kononov wrote:
> On 12/27/2006 05:19 PM, Tom Lane wrote:
> > Roman Kononov <kononov195-pgsql(at)yahoo(dot)com> writes:
> >> On 12/27/2006 03:23 PM, Bruce Momjian wrote:
> >>> Are you sure?  As I remember, computation automatically upgrades to
> >>> 'double'.  See this program and output:
> > 
> >> This is platform- and compiler- dependent:
> > 
> > ... and probably irrelevant, too.  We should store the result into a
> > float4 variable and then test for isinf() on that; that eliminates the
> > question of whether the compiler did the multiply in a wider format or
> > not.
> 
> You are right provided that you want to ignore underflows and silently
> produce zeros instead.
> 
> If you go this way, I recommend to ignore overflows as well, and silently
> produce infinities and NaNs.

While IEEE seems fine with that, I don't think this is good for SQL.  It
is best to produce a meaningful error.  The major issue is that our
current code is buggy because it doesn't have consistent behavior, as
Roman outlined.

-- 
  Bruce Momjian   bruce(at)momjian(dot)us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

In response to

pgsql-hackers by date

Next:From: Michael FuhrDate: 2006-12-28 04:40:54
Subject: Re: psql display of Unicode combining characters in 8.2
Previous:From: Bruce MomjianDate: 2006-12-28 01:42:27
Subject: Re: [BUGS] BUG #2846: inconsistent and confusing

pgsql-patches by date

Next:From: Albert Cervera ArenyDate: 2006-12-28 02:11:59
Subject: Re: Tablespace for temporary objects and sort files
Previous:From: Bruce MomjianDate: 2006-12-28 01:42:27
Subject: Re: [BUGS] BUG #2846: inconsistent and confusing

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group