Re: Rounding to even for numeric data type

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Michael Paquier *EXTERN*" <michael(dot)paquier(at)gmail(dot)com>, James Cloos <cloos(at)jhcloos(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Rounding to even for numeric data type
Date: 2015-03-30 08:27:49
Message-ID: A737B7A37273E048B164557ADEF4A58B365C6094@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier wrote:
> Well, I am not sure about that... But reading this thread changing the
> default rounding sounds unwelcome. So it may be better to just put in
> words the rounding method used now in the docs, with perhaps a mention
> that this is not completely in-line with the SQL spec if that's not
> the case.

The SQL standard does not care, it says that numbers and other data types
should, whenever necessary, be rounded or truncated in an implementation-
defined fashion.

I cannot find any mention of a round() function.

Yours,
Laurenz Albe

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2015-03-30 09:26:58 Concurrent calls of _hash_getnewbuf()
Previous Message Fabien COELHO 2015-03-30 06:00:30 Re: getting rid of "thread fork emulation" in pgbench?