Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2

Поиск
Список
Период
Сортировка
От
Тема Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2
Дата
Msg-id Pine.LNX.4.10.10008061433470.22893-100000@nemo.house
обсуждение исходный текст
Ответ на Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2
Список pgsql-general
> I suppose we could implement the conversion as "float8in(float4out(x))"
> instead of "(double) x" but it'd be several orders of magnitude slower,
> as well as being *less* useful to those who know what they're doing with
> float math (since the result would actually be a less-precise conversion
> except in cases where the intended value has a short decimal
> representation).

We only need to maintain the lower-order bit(s). Seems this could be done
a lot easier than by an ascii in-between.

Is there a reason we can't perform the conversion and then copy the
low-order bits manually, with some bit-shifting and masking?

Ian


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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: foreign keys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: Trouble with float4 afterupgrading from 6.5.3 to 7.0.2