Re: pgsql: Allow numeric scale to be negative or greater than precision.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Allow numeric scale to be negative or greater than precision.
Date: 2021-07-27 16:22:47
Message-ID: 330928.1627402967@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Fujii Masao 2021-07-27 16:28:34 pgsql: Avoid using ambiguous word "non-negative" in error messages.
Previous Message Simon Riggs 2021-07-27 16:10:41 Re: pgsql: Allow numeric scale to be negative or greater than precision.