Re: proposal: rounding up time value less than its unit.

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: rounding up time value less than its unit.
Date: 2014-08-23 22:39:30
Message-ID: CAM-w4HOEM6=M8RtMM5LDaoLhwbF8Y9b1n1NioU-zRN5tbd9T1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Aug 23, 2014 at 9:38 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Ah. Okay, but then what's wrong with the original proposal of "use ceil()
> instead of floor()"? Basically I think the idea of treating fractions
> less than one differently from fractions greater than one is bogus; nobody
> will ever find that intuitive.

Or make it an error to specify a value that rounds to 0 but isn't 0.

--
greg

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G Johnston 2014-08-24 00:17:52 Re: proposal: rounding up time value less than its unit.
Previous Message Tom Lane 2014-08-23 22:23:25 Re: change alter user to be a true alias for alter role