Re: NUMERIC private methods?

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: NUMERIC private methods?
Дата
Msg-id 87fvcdljq2.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: NUMERIC private methods?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: NUMERIC private methods?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
>> Hmm. You'd want to make add_var, mul_var etc. non-static?
Tom> -1 for that.

possibly with more meaningful names.
Tom> If you're concerned about arithmetic performance, there is aTom> very obvious fix here: use double.

Independently of this specific example, the obvious issue there is that
there are applications for which double is simply not acceptable.

As it stands, no extension can use the numeric type in any non-trivial
way without paying a large penalty for repeated pallocs and data copies.
Given that the ability to write C extensions easily is one of pg's great
strengths, this is a defect that should be corrected.
Tom> (It would still be orders of magnitude slower, no matter howTom> much we were willing to destroy numeric.c's
modularityTom>boundary.)
 

There is no need to expose any details of NumericVar's implementation;
it would suffice to provide an interface to allocate NumericVars, and
access to the functions.

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [REVIEW] Re: Compression of full-page-writes
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: TABLESAMPLE patch