• Tom Lane's avatar
    Fix numeric width_bucket() to allow its first argument to be infinite. · 8ce423b1
    Tom Lane authored
    While the calculation is not well-defined if the bounds arguments are
    infinite, there is a perfectly sane outcome if the test operand is
    infinite: it's just like any other value that's before the first bucket
    or after the last one.  width_bucket_float8() got this right, but
    I was too hasty about the case when adding infinities to numerics
    (commit a57d312a), so that width_bucket_numeric() just rejected it.
    Fix that, and sync the relevant error message strings.
    
    No back-patch needed, since infinities-in-numeric haven't shipped yet.
    
    Discussion: https://postgr.es/m/2465409.1602170063@sss.pgh.pa.us
    8ce423b1
numeric.out 107 KB