Extract (week from date ) bug.

From: Ubold Hooper <uhooper(at)amplify(dot)com>
To: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Extract (week from date ) bug.
Date: 2013-10-30 19:46:35
Message-ID: 375B948D2EECB74DBF35610C8581471A7024F8@WgExch09.wgenhq.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I think there must be a bug in the date calculations.
Consider the following query

select extract(week from date('2010-12-31')), extract(week from date('2011-01-01')), extract(week from date('2011-01-03'))

Result:
date_part date_part date_part
52 52 1

Why is extract(week from date('2011-01-01')) not identified as week 1?

-- Ubold Hooper
Amplify Insight| 55 Washington St. Brooklyn, NY. 11201|Tel: 347-474-4829|Email: uhooper(at)amplify(dot)com<mailto:uhooper(at)amplify(dot)com>

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David Johnston 2013-10-30 20:43:57 Re: Extract (week from date ) bug.
Previous Message David Johnston 2013-10-30 16:41:58 Re: BUG #8569: with recursive work incorrectly with function