Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error
Дата
Msg-id 28174.1579481178@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
Ranier Vilela <ranier.vf@gmail.com> writes:
> Yes, but the comment it does not clarify that the return of the variable
> "const_one" is intentional, instead of "const_zero".

I'm not sure which part of "NaN ^ 0 = 1" doesn't clarify for you that
the intended result is 1.

Even without the comment, if you'd bothered to run the regression tests
you'd have noted a failure of a test case clearly intended to test
exactly this behavior.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: range_agg
Следующее
От: "tsunakawa.takay@fujitsu.com"
Дата:
Сообщение: RE: SLRU statistics