Re: [HACKERS] pow support for pgbench

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [HACKERS] pow support for pgbench
Дата
Msg-id alpine.DEB.2.20.1712060647280.19178@lancre
обсуждение исходный текст
Ответ на Re: [HACKERS] pow support for pgbench  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
>> In both cases we'd return a double but we use the fast ipow if it's 
>> possible (which can be 20x faster), so at the cost of an extra cast if 
>> you need an int, we'd have a consistent API. Would this be acceptable?
>
> It seems OK to me.

Computing as an int, casting to double and back to int8 can generate a 
loss of precision. However for powers of 2 it works exactly, so eg 
computing a mask it would be ok.

This proposal does not exactly match SQL behavior, but I do not see this 
as a problem, which is why I was happy with the previous proposal.

-- 
Fabien.


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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] Proposal: Local indexes for partitioned table
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: explain analyze output with parallel workers - question aboutmeaning of information for explain.depesz.com