Re: pgsql: Allow numeric scale to be negative or greater than precision. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Allow numeric scale to be negative or greater than precision.
Date
Msg-id 330928.1627402967@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Allow numeric scale to be negative or greater than precision.  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: pgsql: Allow numeric scale to be negative or greater than precision.  (Simon Riggs <simon.riggs@enterprisedb.com>)
List pgsql-committers
Simon Riggs <simon.riggs@enterprisedb.com> writes:
> This is for migration?

Yeah, compatibility with some other DBMSes that allow this.

> Or does it mean very small values now occupy less space since we store
> fewer zeros?

It won't affect space consumption at all, as NUMERIC has never stored
leading or trailing zeroes.  (Modulo the fact that "zero" here means
a base-NDIGIT digit.)

            regards, tom lane



pgsql-committers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: pgsql: Allow numeric scale to be negative or greater than precision.
Next
From: Fujii Masao
Date:
Subject: pgsql: Avoid using ambiguous word "non-negative" in error messages.