Re: numeric and float comparison oddities

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: numeric and float comparison oddities
Дата
Msg-id 1771.1406921230@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: numeric and float comparison oddities  (Kevin Grittner <kgrittn@ymail.com>)
Ответы Re: numeric and float comparison oddities  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-hackers
Kevin Grittner <kgrittn@ymail.com> writes:
> It would be more consistent, ISTM, to cast 
> float8 to float4 when those are compared, and to cast numeric to 
> whichever type is on the other side of the comparison operator.

I would vote against that on the grounds of greatly increased risk
of overflow failure.  Admittedly, numeric->float8 can also fail,
but float4 only goes to 1e37 or thereabouts.
        regards, tom lane



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

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: numeric and float comparison oddities
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: numeric and float comparison oddities