Subject: unclear description for the Pattern Modifiers in formatting functions

From: Marc Mamin <[email-masked]>
Date: Tue, 25 Aug 2015 13:29:43 +0000

http://www.postgresql.org/docs/9.5/static/functions-formatting.html#FUNCTIONS-FORMATTING-DATETIMEMOD-TABLE 

The page suggests that the pattern modifiers (e.g. 'FM') only apply for Date/Time Format.

But at least FM can also be used for number types:

select to_char(1,'(99999)')
UNION ALL
select to_char(1,'(FM99999)')
-----------------------------
(     1)
(1)

Maybe it would be sufficient to just add FM into the table 9.24
( http://www.postgresql.org/docs/9.5/static/functions-formatting.html#FUNCTIONS-FORMATTING-NUMERIC-TABLE )

regards,

Marc Mamin

-- 
Sent via pgsql-docs mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs

---

From: Tom Lane <[email-masked]>
Date: Tue, 25 Aug 2015 19:45:57 -0400

> The page suggests that the pattern modifiers (e.g. 'FM') only apply for Date/Time Format.

There are two separate tables (9-23, 9-25) showing which modifiers apply
for date/time and numeric cases, so I think it is fine as-is.

Mind you, the whole page is rather awkward.  Perhaps it would benefit from
being thrown away and rewritten from scratch.  I'm not volunteering though.

			regards, tom lane