pgsql: Make int64_div_fast_to_numeric() more robust.

2023-02-03 Thread Dean Rasheed
Make int64_div_fast_to_numeric() more robust. The prior coding of int64_div_fast_to_numeric() had a number of bugs that would cause it to fail under different circumstances, such as with log10val2 <= 0, or log10val2 a multiple of 4, or in the "slow" numeric path with log10val2 >= 10. None of

pgsql: Make int64_div_fast_to_numeric() more robust.

2023-02-03 Thread Dean Rasheed
Make int64_div_fast_to_numeric() more robust. The prior coding of int64_div_fast_to_numeric() had a number of bugs that would cause it to fail under different circumstances, such as with log10val2 <= 0, or log10val2 a multiple of 4, or in the "slow" numeric path with log10val2 >= 10. None of

pgsql: Make int64_div_fast_to_numeric() more robust.

2023-02-03 Thread Dean Rasheed
Make int64_div_fast_to_numeric() more robust. The prior coding of int64_div_fast_to_numeric() had a number of bugs that would cause it to fail under different circumstances, such as with log10val2 <= 0, or log10val2 a multiple of 4, or in the "slow" numeric path with log10val2 >= 10. None of