Re: WIP: Relaxing the constraints on numeric scale

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-06-29T20:34:32Z
Lists: pgsql-hackers
On Tue, Jun 29, 2021 at 3:58 PM Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> When specifying NUMERIC(precision, scale) the scale is constrained to
> the range [0, precision], which is per SQL spec. However, at least one
> other major database vendor intentionally does not impose this
> restriction, since allowing scales outside this range can be useful.

I thought about this too, but
http://postgr.es/m/774767.1591985683@sss.pgh.pa.us made me think that
it would be an on-disk format break. Maybe it's not, though?

-- 
Robert Haas
EDB: http://www.enterprisedb.com



Commits

  1. Allow numeric scale to be negative or greater than precision.