Skip site navigation (1) Skip section navigation (2)

BUG #6178: date_trunc : interval units "week" not supported contradicts documentation

From: "Noah Hamerslough" <noah(at)pcc(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6178: date_trunc : interval units "week" not supported contradicts documentation
Date: 2011-08-25 19:05:34
Message-ID: 201108251905.p7PJ5YLe075723@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      6178
Logged by:          Noah Hamerslough
Email address:      noah(at)pcc(dot)com
PostgreSQL version: 8.4
Operating system:   Windows Vista
Description:        date_trunc : interval units "week" not supported
contradicts documentation
Details: 

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

The documentation for date_trunc('field', source) lists 'week' in the as a
valid value for 'field' However, if the source is an interval, 'week' is not
supported. 

 select date_trunc('week', '1 month 15 days'::interval);

 ERROR: interval units "week" not supported
 SQL state: 0A000

Either 'week' should be supported or the documentation should be updated to
reflect that it is not.

Responses

pgsql-bugs by date

Next:From: Kevin GrittnerDate: 2011-08-25 20:12:22
Subject: Re: BUG #6177: Size field type TEXT
Previous:From: Claudio OliveiraDate: 2011-08-25 18:29:24
Subject: Re: BUG #6177: Size field type TEXT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group