Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?
Date
Msg-id CA+TgmoY-qU53mzkXPqajkczM2Zhou-m509knf4AstgG2QwtptQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-hackers
On Sun, Sep 15, 2013 at 8:05 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> But note that the current behavior is worse in this regard.  If you specify
> a scale of 4 at the column level, than it is not possible to distinguish
> between 5.000 and 5.0000 on a per-value basis within that column.  If the
> scale at the column level was taken as the maximum scale, not the only
> allowed one, then that distinction could be recorded. That behavior seems
> more sensible to me (metrologically speaking, regardless of alter table
> performance aspects), but I don't see how to get there from here with
> acceptable compatibility breakage.

I think I'd probably agree with that in a green field, but as you say,
I can't see accepting the backward compatibility break at this point.
After all, you can get variable-precision in a single column by
declaring it as unqualified numeric.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: logical changeset generation v6
Next
From: Robert Haas
Date:
Subject: Re: pg_system_identifier()