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 8192.1427306273@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #12885: The result of casting a double to an integer depends on the database version  (rschaaf@commoninf.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>)
Список pgsql-bugs
Pedro Gimeno <pgsql-004@personal.formauri.es> writes:
> The previous version left out a corner case. Attached is a function and
> test suite to deal with it.

Hmm ... I'm thinking we probably should explicitly check for inf and NaN,
no?

    if (isnan(x) || isinf(x))
       return x;

It's possible the given coding would return this result anyway by
accident, but that seems rather fragile.

            regards, tom lane

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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: BUG #12896: Unable to export data from Postgresql database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Re: BUG #12885: The result of casting a double to an integer depends on the database version