Re: Why length(to_char(1::integer, '9')) = 2 ? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Why length(to_char(1::integer, '9')) = 2 ?
Date
Msg-id 201103101839.p2AId8t12834@momjian.us
Whole thread Raw
In response to Re: Why length(to_char(1::integer, '9')) = 2 ?  (Dmitriy Igrishin <dmitigr@gmail.com>)
Responses Re: Why length(to_char(1::integer, '9')) = 2 ?  (Dmitriy Igrishin <dmitigr@gmail.com>)
List pgsql-general
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?

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

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

pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Upgraded to 9.0.3, No Man Pages
Next
From: Dmitriy Igrishin
Date:
Subject: Re: Why length(to_char(1::integer, '9')) = 2 ?