aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-12-03 16:45:23 +0000
committerBruce Momjian <bruce@momjian.us>2005-12-03 16:45:23 +0000
commitdfdec6044798adfb167c39c12a00c1bbb451a0b0 (patch)
tree156445a7fe2723cf1822fd18b6525291070cb789 /doc/src
parent4ed2e803ef4580ed590f310574b9d6587aaa7231 (diff)
downloadpostgresql-dfdec6044798adfb167c39c12a00c1bbb451a0b0.tar.gz
postgresql-dfdec6044798adfb167c39c12a00c1bbb451a0b0.zip
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 0148d72d22d..dc927737c31 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.291.2.2 2005/11/28 23:19:03 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.291.2.3 2005/12/03 16:45:22 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>