to_char(): 'FM' also suppresses *trailing* zeroes

From: Erwin Brandstetter <brsaweda(at)gmail(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: to_char(): 'FM' also suppresses *trailing* zeroes
Date: 2017-08-18 00:01:39
Message-ID: CAGHENJ7jgRbTn6nf48xNZ=FHgL2WQ4X8mYsUAU57f-vq8PubEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

In Table 9-27. "Template Pattern Modifiers for Numeric Formatting" it says:

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

https://www.postgresql.org/docs/current/static/functions-formatting.html#FUNCTIONS-FORMATTING-NUMERICMOD-TABLE

In fact, 'FM' also suppresses *trailing* zeroes after the comma. To fix,
this might be changed to:

suppress insignificant zeroes and padding blanks

Or:

suppress padding zeroes and blanks

Regards
Erwin Brandstetter

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message ralph.holz 2017-08-18 06:05:06 Requesting clarifying details on extract(epoch from timestamp)
Previous Message Thom Brown 2017-08-17 23:04:35 Log rotation note