summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-03 16:45:06 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-03 16:45:06 +0000
commitd20901a39bc6b968853546f4e76ba4337aa5eaa0 (patch)
tree55d3097621c5447b02fb37314d369c7bcb1aae39 /doc/src
parenteb339c7840522a229967d8155a6920282cfb07c1 (diff)
Allow to_char(interval) and to_char(time) to use AM/PM specifications.
Map them to a single day, so '30 hours' is 'AM'. Have to_char(interval) and to_char(time) use "HH", "HH12" as 12-hour intervals, rather than bypass and print the full interval hours. This is neeeded because to_char(time) is mapped to interval in this function. Intervals should use "HH24", and document suggestion. Allow "D" format specifiers for interval/time.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/func.sgml10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 7d603ef9782..f3df6181798 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,5 +1,5 @@
<!--
-$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.296 2005/11/28 23:18:48 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.297 2005/12/03 16:45:05 momjian Exp $
PostgreSQL documentation
-->
@@ -4749,6 +4749,14 @@ SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1,3})');
<function>extract</function> function.
</para>
</listitem>
+
+ <listitem>
+ <para><function>to_char(interval)</function> formats <literal>HH</> and
+ <literal>HH12</> as hours in a single day, while <literal>HH24</>
+ can output hours exceeding a single day, e.g. &gt;24.
+ </para>
+ </listitem>
+
</itemizedlist>
</para>