Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version
Дата
Msg-id
22366.1427313454@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Pedro Gimeno <pgsql-004@personal.formauri.es>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Dean Rasheed <dean.a.rasheed@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Andrew Gierth <andrew@tao11.riddles.org.uk>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version Michael Paquier <michael.paquier@gmail.com>
Pedro Gimeno  writes:
> Tom Lane wrote, On 2015-03-25 18:57:
>> Hmm ... I'm thinking we probably should explicitly check for inf and NaN,
>> no?

> I agree about NaN; it worked but mostly by accident. The big number
> detection catches infinity unambiguously. Added to a comment in the
> attached (plus corresponding tests).

I fooled around with this some more for clarity and committed it.
Thanks for your work!

BTW, if memory serves we also have a pretty lazy rounding implementation
for the numeric datatype.  I wonder if now would be a good time to upgrade
that to be round-to-nearest-even as well.

			regards, tom lane
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Michael Paquier
Дата:
FAQ