pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Florian G. Pflug <fgp@phlo.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-hackers@postgresql.org, PostgreSQL-patches <pgsql-patches@postgresql.org>
Cc: Roman Kononov <kononov195-pgsql@yahoo.com>
Subject: Re: [HACKERS] [BUGS] BUG #2846: inconsistent and
Date: Fri, 29 Dec 2006 16:52:24 +0100
Message-ID: <459539B8.5080904@phlo.org> (raw)
In-Reply-To: <2427.1167406410@sss.pgh.pa.us>
References: <200612291512.kBTFCVY02214@momjian.us>
	<2427.1167406410@sss.pgh.pa.us>

Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> OK, are you saying that there is a signal we are ignoring for
>> overflow/underflow, or that we should just silently overflow/underflow
>> and not throw an error?
> 
> Silent underflow is fine with me; it's the norm in most all float
> implementations and won't surprise anyone.  For overflow I'm OK with
> either returning infinity or throwing an error --- but if an error,
> it should only be about inf-out-with-non-inf-in, not comparisons to any
> artificial MAX/MIN values.
> 
> Anyone else have an opinion about this?
If an underflow is not reported (And thus silently treated as zero), then
it'd make sense for me to deal with overflows in a similar way, and just
return infinity.

The most correct solution would IMHO be to provide a guc variable
"strict_float_semantics" that defaults to "off", meaning that neather
overflow nor underflow reports an error. If the variable was set to on,
_both_ overflow and underflow would be reported.

Just my €0.02

greetings, Florian Pflug






view thread (10+ messages)  latest in thread

Message-ID: <459539B8.5080904@phlo.org>
Permalink:  ../459539B8.5080904@phlo.org/
Also on:    postgresql.org/message-id/459539B8.5080904@phlo.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: fgp@phlo.org, tgl@sss.pgh.pa.us, bruce@momjian.us, pgsql-patches@postgresql.org, kononov195-pgsql@yahoo.com
  Subject: Re: [HACKERS] [BUGS] BUG #2846: inconsistent and
  In-Reply-To: <459539B8.5080904@phlo.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox