Subject: Missing date_trunc docs

From: Eric Howe <[email-masked]>
Date: Fri, 7 Jun 2013 11:32:14 -0700

In table 9-27 of the 9.2 docs:

	http://www.postgresql.org/docs/9.2/interactive/functions-datetime.html#FUNCTIONS-DATETIME-TABLE

There is an entry for date_trunc(text, timestamp) but no entry for date_trunc(text, interval). The full docs for date_trunc:

	http://www.postgresql.org/docs/9.2/interactive/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC

do mention both the timestamp and interval forms of date_trunc but that's easy to miss if you're just scanning the function lists.

Eric Howe
[email-masked]
http://pieinsky.ca/

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

---

From: Bruce Momjian <[email-masked]>
Date: Wed, 22 Jan 2014 22:27:29 -0500

> do mention both the timestamp and interval forms of date_trunc but that's easy to miss if you're just scanning the function lists.

Thanks for the report.  The attached patch has been applied and will
appear in PG 9.4.  Sorry for the delay.

-- 
  Bruce Momjian  <[email-masked]>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
new file mode 100644
index 53021c2..e79c479
*** a/doc/src/sgml/func.sgml
--- b/doc/src/sgml/func.sgml
*************** SELECT SUBSTRING('XY1234Z', 'Y*?([0-9]{1
*** 6570,6575 ****
--- 6570,6589 ----
         <row>
          <entry>
           <indexterm>
+           <primary>date_trunc</primary>
+          </indexterm>
+          <literal><function>date_trunc(<type>text</type>, <type>interval</type>)</function></literal>
+         </entry>
+         <entry><type>interval</type></entry>
+         <entry>Truncate to specified precision; see also <xref linkend="functions-datetime-trunc">
+         </entry>
+         <entry><literal>date_trunc('hour', interval '2 days 3 hours 40 minutes')</literal></entry>
+         <entry><literal>2 days 03:00:00</literal></entry>
+        </row>
+ 
+        <row>
+         <entry>
+          <indexterm>
            <primary>extract</primary>
           </indexterm>
           <literal><function>extract</function>(<parameter>field</parameter> from