From: | Vincenzo Romano <vincenzo(dot)romano(at)notorand(dot)it> |
---|---|
To: | Francisco Olarte <folarte(at)peoplecall(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org>, Олег Самойлов <olleg(at)mipt(dot)ru> |
Subject: | Re: Numeric numbers |
Date: | 2017-09-02 16:11:56 |
Message-ID: | CAHjZ2x69bVPWt1k3w3fXOAkRi5F8tw3082fWZqZ--wKCPvR3qg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Quoting from documentation:
"without any precision or scale [you get] a column in which values of any
precision and scale can be stored, up to the implementation limit on
precision."
I suspect the cast is doing some precision limitation.
--
Vincenzo Romano - NotOrAnd.IT
Information Technologies
--
NON QVIETIS MARIBVS NAVTA PERITVS
Il 02 set 2017 17:57, "Francisco Olarte" <folarte(at)peoplecall(dot)com> ha
scritto:
> On Sat, Sep 2, 2017 at 4:16 PM, Олег Самойлов <olleg(at)mipt(dot)ru> wrote:
> > Hi all. I have silly question. Look at "numeric" type. According to
> > docs it must be "up to 131072 digits before the decimal point; up to
> > 16383 digits after the decimal point". Well, lets see.
> >
> > => select 1::numeric/3;
> > ?column?
> > ------------------------
> > 0.33333333333333333333
>
> => select 1::numeric(100,90)/3;
> ?column?
> ------------------------------------------------------------
> ----------------------------------
> 0.333333333333333333333333333333333333333333333333333333333333
> 333333333333333333333333333333
> (1 row)
>
> It's probably doing 1(integer) => double precioson => numeric(20) or
> something similar if you do not specify.
>
> Francisco Olarte.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
From | Date | Subject | |
---|---|---|---|
Next Message | Vincenzo Romano | 2017-09-02 16:20:55 | Re: Numeric numbers |
Previous Message | Melvin Davidson | 2017-09-02 16:10:41 | Re: Numeric numbers |