Bug in docs - modifiers for to_char()

Started by hubert depesz lubaczewskialmost 11 years ago2 messagesbugs
Jump to latest

Hi,
in Table 9-23
(http://www.postgresql.org/docs/devel/static/functions-formatting.html)

It says:

FM prefix | fill mode (suppress padding blanks and trailing zeroes)

In next part it says:

FM suppresses leading zeroes and trailing blanks

From all I can tell, the text in table is wrong - wasn't able to find
any case where FM would delete trailing zeros, and it definitely removes
leading ones.

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: hubert depesz lubaczewski (#1)
Re: Bug in docs - modifiers for to_char()

hubert depesz lubaczewski <depesz@depesz.com> writes:

in Table 9-23
(http://www.postgresql.org/docs/devel/static/functions-formatting.html)
It says:

FM prefix | fill mode (suppress padding blanks and trailing zeroes)

In next part it says:

FM suppresses leading zeroes and trailing blanks

From all I can tell, the text in table is wrong - wasn't able to find
any case where FM would delete trailing zeros, and it definitely removes
leading ones.

Yeah, you're right.

I also fail to find anyplace where it explains what FM does for input
cases. However, to_number/to_date/to_timestamp are woefully
underdocumented anyhow (eg, almost no examples), so maybe that would
be better addressed as part of a larger rewrite.

regards, tom lane

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs