Re: cast numeric with scale and precision to numeric plain - Mailing list pgsql-general

From Sim Zacks
Subject Re: cast numeric with scale and precision to numeric plain
Date
Msg-id 4ADDD9E0.5080901@compulab.co.il
Whole thread Raw
In response to Re: cast numeric with scale and precision to numeric plain  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: cast numeric with scale and precision to numeric plain
Re: cast numeric with scale and precision to numeric plain
List pgsql-general
>> According to the documentation, numeric is stored without any leading
>> or trailing zeros.
>>
>
> That says *stored*; it doesn't say *displayed*.
>
>             regards, tom lane
>
If it displays them, it has to know they exist. That means it stores it
somewhere.
> The part of the above that you need to look at is where it says it does not
> store 'any extra leading or trailing zeroes'. In your case you entered the
> value with three trailing zeroes which are taken to be significant (see Toms
> reply also). If you had inserted just 15 you would have gotten back 15.
>
I guess that's a matter of interpretation. To me zeros after a decimal
point without anything else after them are extra.

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: Sharedbuffers and WorkMem
Next
From: Viktor Rosenfeld
Date:
Subject: Re: different execution times of the same query