Search Postgresql Archives

Re: Why length(to_char(1::integer, '9')) = 2 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





2011/3/10 Bruce Momjian <bruce@xxxxxxxxxx>
Dmitriy Igrishin wrote:
> dmitigr=> SELECT '>'||to_char(0.1, '0.99999')||'<' AS v;
> Â Â Âv
> ------------
> Â> 0.10000<
>
> dmitigr=> SELECT '>'||to_char(0.1, 'FM0.99999')||'<' AS v;
> Â Âv
> -------
> Â>0.1<
>
> So, padding zeroes suppressed by FM is a rest of the value.

Any documentation changes suggested?
I propose to replace "fill mode (suppress padding blanks and zeroes)"
located here
http://www.postgresql.org/docs/9.0/static/functions-formatting.html#FUNCTIONS-FORMATTING-NUMERICMOD-TABLE
with
"fill mode (suppress padding blanks and trailing zeroes)".

--
ÂBruce Momjian Â<bruce@xxxxxxxxxx> Â Â Â Âhttp://momjian.us
ÂEnterpriseDB Â Â Â Â Â Â Â Â Â Â Â Â Â Â http://enterprisedb.com

Â+ It's impossible for everything to be true. +



--
// Dmitriy.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux