diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2008-02-26 15:32:30 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2008-02-26 15:32:30 +0000 |
commit | f26203ef32e70127e44a084ceae2be8fafba1928 (patch) | |
tree | 3404f3d79ebd936a66d1e61cc7d7ea0c1c28d7e3 | |
parent | bd929b49095c33ce08a543f7497f9501fa82eeb9 (diff) | |
download | postgresql-f26203ef32e70127e44a084ceae2be8fafba1928.tar.gz postgresql-f26203ef32e70127e44a084ceae2be8fafba1928.zip |
Add information about format modifiers that apply to numeric formats.
These were previously only documented in the context of date/time formats.
-rw-r--r-- | doc/src/sgml/func.sgml | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 340efac6556..b362d8ac034 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.419 2007/12/21 03:37:18 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.420 2008/02/26 15:32:30 petere Exp $ --> <chapter id="functions"> <title>Functions and Operators</title> @@ -5320,6 +5320,45 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})'); </itemizedlist> </para> + <para> + Certain modifiers can be applied to any template pattern to alter its + behavior. For example, <literal>FM9999</literal> + is the <literal>9999</literal> pattern with the + <literal>FM</literal> modifier. + <xref linkend="functions-formatting-numericmod-table"> shows the + modifier patterns for numeric formatting. + </para> + + <table id="functions-formatting-numericmod-table"> + <title>Template Pattern Modifiers for Numeric Formatting</title> + <tgroup cols="3"> + <thead> + <row> + <entry>Modifier</entry> + <entry>Description</entry> + <entry>Example</entry> + </row> + </thead> + <tbody> + <row> + <entry><literal>FM</literal> prefix</entry> + <entry>fill mode (suppress padding blanks and zeroes)</entry> + <entry><literal>FM9999</literal></entry> + </row> + <row> + <entry><literal>TH</literal> suffix</entry> + <entry>uppercase ordinal number suffix</entry> + <entry><literal>999TH</literal></entry> + </row> + <row> + <entry><literal>th</literal> suffix</entry> + <entry>lowercase ordinal number suffix</entry> + <entry><literal>999th</literal></entry> + </row> + </tbody> + </tgroup> + </table> + <para> <xref linkend="functions-formatting-examples-table"> shows some examples of the use of the <function>to_char</function> function. |