Re: [BUG] Denormal float values break backup/restore

Поиск
Список
Период
Сортировка
От Jeroen Vermeulen
Тема Re: [BUG] Denormal float values break backup/restore
Дата
Msg-id 4DF3BD2D.5020800@xs4all.nl
обсуждение исходный текст
Ответ на Re: [BUG] Denormal float values break backup/restore  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUG] Denormal float values break backup/restore
Список pgsql-hackers
On 2011-06-11 01:57, Tom Lane wrote:

> (5) Lobby your libc providers to make strtod accept denormals without
> throwing ERANGE.  There is no obvious reason why it shouldn't.  (On at
> least one of my boxes, it does.)

The standard either explicitly allows or requires this behaviour 
(depending on which text I look at) for underflow.

AIUI that is defined to be a little vague, but includes denormalized 
numbers that would undergo any rounding at all.  It says that on 
overflow the conversion should return the appropriate HUGE_VAL variant, 
and set ERANGE.  On underflow it returns a reasonably appropriate value 
(and either may or must set ERANGE, which is the part that isn't clear 
to me).

ISTM the appropriate response to ERANGE combined with a "small" return 
value is to either ignore or report the rounding error, but accept the 
return value.  The current code in float.c doesn't check the return 
value at all and treats all ERANGE conditions as equal.


Jeroen


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Identifying no-op length coercions
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: pgbench--new transaction type