Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <stark(at)mit(dot)edu>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, wangshuo(at)highgo(dot)com(dot)cn, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Is it necessary to rewrite table while increasing the scale of datatype numeric?
Date: 2013-09-17 14:49:42
Message-ID: CA+TgmoY-qU53mzkXPqajkczM2Zhou-m509knf4AstgG2QwtptQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Sep 15, 2013 at 8:05 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-09-17 14:57:46 Re: pg_system_identifier()
Previous Message Andres Freund 2013-09-17 14:31:10 Re: logical changeset generation v6