Re: Numeric numbers

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Олег Самойлов <olleg(at)mipt(dot)ru>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Numeric numbers
Date: 2017-09-02 15:54:02
Message-ID: CA+bJJbz-qvDBdCMyn0stRVguqx4Rh7C-dhihYLf7gNmgmtd-Jg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333
(1 row)

It's probably doing 1(integer) => double precioson => numeric(20) or
something similar if you do not specify.

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2017-09-02 16:10:41 Re: Numeric numbers
Previous Message Олег Самойлов 2017-09-02 14:16:05 Numeric numbers