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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: rounding up time value less than its unit.
Дата
Msg-id 17056.1408826337@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal: rounding up time value less than its unit.  (David G Johnston <david.g.johnston@gmail.com>)
Ответы Re: proposal: rounding up time value less than its unit.  (Greg Stark <stark@mit.edu>)
Re: proposal: rounding up time value less than its unit.  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-hackers
David G Johnston <david.g.johnston@gmail.com> writes:
> Tom Lane-2 wrote
>> Indeed.  I have not understood why you are insisting on "round up"
>> semantics.  Wouldn't it make more sense for the behavior to be "round to
>> nearest"?  That would get rid of any worries about treating zero
>> specially.

> Wasn't the goal that all non-zero values result in the feature being
> enabled?  With round nearest there will still be some values that are
> non-zero but that round to zero and thus disable the feature.

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 we could adopt Peter's idea that zero shouldn't be special (instead
using, say, -1 to turn things off).  But I'm afraid that would break way
too many peoples' configuration choices.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David G Johnston
Дата:
Сообщение: Re: proposal: rounding up time value less than its unit.
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Removing dependency to wsock32.lib when compiling code on WIndows