]> granicus.if.org Git - postgresql/commit
Improve docs about numeric formatting patterns (to_char/to_number).
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Aug 2017 13:34:21 +0000 (09:34 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 29 Aug 2017 13:34:21 +0000 (09:34 -0400)
commit669bef911c00808b6a7672044ea6dcf1f124cd13
treecddf6db7880dd3e602c4bf786331cdfcfea094d2
parent93067c53ae49eaa1fe7bedaf2ba4e3e8f2a6cbfa
Improve docs about numeric formatting patterns (to_char/to_number).

The explanation about "0" versus "9" format characters was confusing
and arguably wrong; the discussion of sign handling wasn't very good
either.  Notably, while it's accurate to say that "FM" strips leading
zeroes in date/time values, what it really does with numeric values
is to strip *trailing* zeroes, and then only if you wrote "9" rather
than "0".  Per gripes from Erwin Brandstetter.

Discussion: https://postgr.es/m/CAGHENJ7jgRbTn6nf48xNZ=FHgL2WQ4X8mYsUAU57f-vq8PubEw@mail.gmail.com
Discussion: https://postgr.es/m/CAGHENJ45ymd=GOCu1vwV9u7GmCR80_5tW0fP9C_gJKbruGMHvQ@mail.gmail.com
doc/src/sgml/func.sgml