Re: cast numeric with scale and precision to numeric plain

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: cast numeric with scale and precision to numeric plain
Date: 2009-10-20 15:40:16
Message-ID: 4ADDD9E0.5080901@compulab.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Wall 2009-10-20 16:00:39 Re: When much of a DB is large objects - PG 8.4
Previous Message Viktor Rosenfeld 2009-10-20 15:40:14 Re: different execution times of the same query