Numeric Scale Differences - Mailing list pgsql-novice

From Nuno Sousa
Subject Numeric Scale Differences
Date
Msg-id CAMZ4ZVqq9kHN7DJs5T=zL8jDJuk-3v2-spyYtjd8e2xj_OPM8Q@mail.gmail.com
Whole thread Raw
Responses Re: Numeric Scale Differences  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi all,

I've run into an interesting issue when trying to do numeric math. I expected the following to return the same number of decimal digits in the fractional part:

select scale(1/0.6::numeric), scale(1/6::numeric);

But it returns a scale of 16 and 20, respectively.

Any idea why?
--
Nuno Sousa

pgsql-novice by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Password settings requirements
Next
From: Tom Lane
Date:
Subject: Re: Numeric Scale Differences