Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6Ax5-0006pN-Kl for pgsql-docs@arkaria.postgresql.org; Thu, 23 Jan 2014 03:27:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W6Ax5-0002mg-4X for pgsql-docs@arkaria.postgresql.org; Thu, 23 Jan 2014 03:27:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6Ax3-0002lI-MR for pgsql-docs@postgresql.org; Thu, 23 Jan 2014 03:27:33 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W6Ax1-00087s-0C for pgsql-docs@postgresql.org; Thu, 23 Jan 2014 03:27:33 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W6Awz-0003gx-D9; Wed, 22 Jan 2014 22:27:29 -0500 Date: Wed, 22 Jan 2014 22:27:29 -0500 From: Bruce Momjian To: Eric Howe Cc: pgsql-docs@postgresql.org Subject: Re: Missing date_trunc docs Message-ID: <20140123032729.GH6346@momjian.us> References: <7CC1BD41-AB5C-4AE0-B469-18C165D5706B@pieinsky.ca> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline In-Reply-To: <7CC1BD41-AB5C-4AE0-B469-18C165D5706B@pieinsky.ca> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jun 7, 2013 at 11:32:14AM -0700, Eric Howe wrote: > 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. Thanks for the report. The attached patch has been applied and will appear in PG 9.4. Sorry for the delay. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + --MGYHOYXEY6WxJCY8 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="date_trunc.diff" 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 ---- + date_trunc + + date_trunc(text, interval) + + interval + Truncate to specified precision; see also + + date_trunc('hour', interval '2 days 3 hours 40 minutes') + 2 days 03:00:00 + + + + + extract extract(field from --MGYHOYXEY6WxJCY8 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --MGYHOYXEY6WxJCY8--