Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error
Date
Msg-id 28174.1579481178@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] src\backend\utils\adt\numeric.c copy and past error  (Ranier Vilela <ranier.vf@gmail.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: range_agg
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: SLRU statistics