Re: double and numeric conversion

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: double and numeric conversion
Дата
Msg-id 4B8C2A84.5070506@dunslane.net
обсуждение исходный текст
Ответ на double and numeric conversion  (Theo Schlossnagle <jesus@omniti.com>)
Список pgsql-hackers

Theo Schlossnagle wrote:
> Hello all,
>
> I'm writing some extension and I have a hot code path that has a lot of double (C type) data and needs to output
NUMERICtuple data.  The current methods I can find in the code to convert sprintf the double to a buffer and then
invokethe numeric_in function on them.  I've profile my stuff and I'm spending (wasting) all my time in that
conversion. Is there a more efficient method of converting a double into a postgres numeric value?
 
>
>
>   


float8_numeric() ? Although it uses sprintf too, by the look of it.

cheers

andrew


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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Plans for 9.1, Grouping Sets, disabling multiqueries, contrib module for string, plpgpsm, preload dictionaries
Следующее
От: Tom Lane
Дата:
Сообщение: Re: function side effects