Re: [HACKERS] Decimal64 and Decimal128

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: [HACKERS] Decimal64 and Decimal128
Дата
Msg-id CAMsr+YG7vu5G4-QRUJczg0mdHzY5P=1Rvzi-iwKTb=u5QpAngA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Decimal64 and Decimal128  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: [HACKERS] Decimal64 and Decimal128  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
On 16 June 2017 at 05:42, Thomas Munro <thomas.munro@enterprisedb.com> wrote:
> On Fri, Sep 25, 2015 at 5:06 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
>> 2015-09-25 0:25 GMT+02:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
>>>
>>> On 9/24/15 3:35 PM, Peter Geoghegan wrote:
>>>>
>>>> I would worry about the implicit casts you've added. They might cause
>>>> problems.
>>>
>>>
>>> Given the cycle created between numeric->decimal and decimal->numeric, I
>>> can pretty much guarantee they will. In any case, I don't think implicit
>>> casting from numeric->decimal is a good idea since it can overflow. I'm not
>>> sure that the other direction is safe either... I can't remember offhand if
>>> casting correctly obeys typmod or not.
>>>
>>> BTW, have you talked to Pavel about making these changes to his code?
>>> Seems a shame to needlessly fork it. :/
>>
>>
>> yes, he talked with me, and I gave a agreement to continue/enhance/fork this
>> project how will be necessary
>
> Bumping this ancient thread to say that DECFLOAT appears to have
> landed in the SQL standard.  I haven't looked at SQL:2016 myself by I
> just saw this on Markus Winand's Modern SQL blog:
>
> "There is a new type decfloat[(<precision>)] (T076)."
>
> http://modern-sql.com/blog/2017-06/whats-new-in-sql-2016
>
> So far it's supported only by DB2 (inventor) and FirebirdSQL has just
> announced support in the next release.

I was pretty excited by decimal floating point initially, but the lack
of support for its use in hardware in commonplace CPUs makes me less
thrilled. IIRC Intel was talking about adding it, but I can't find any
references to that anymore. POWER6 and POWER7 has it, which is great,
but hardly justifies a push for getting it into the core Pg.

Some of the discussion on
https://software.intel.com/en-us/articles/intel-decimal-floating-point-math-library?page=1
suggests that doing it fully in hardware is very expensive, so a mixed
software/microcode implementation with some hardware assistance is
likely if/when it comes.

--Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: "Tsunakawa, Takayuki"
Дата:
Сообщение: Re: [HACKERS] Huge pages support on Windows
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: [HACKERS] logical replication read-only slave