BUG #7967: Wrong week number in extract function

From: noose(at)noose(dot)pl
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7967: Wrong week number in extract function
Date: 2013-03-18 08:23:16
Message-ID: E1UHVLg-0003bi-Uj@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7967
Logged by: Pawel Kobylak
Email address: noose(at)noose(dot)pl
PostgreSQL version: 9.1.3
Operating system: Debian
Description:

Hi,
I'm running that query and result is ... unexpected for me...

Query:
select '2012-12-31', EXTRACT(year from '2012-12-31'::date), EXTRACT(week
from '2012-12-31'::date)

Result:
"2012-12-31";2012;1

Expected:
"2012-12-31";2012;53
OR
"2012-12-31";2013;1

This result is correct? Or that is little bug? :-)
Regards,
Pawel

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message mperilstein 2013-03-18 16:14:17 BUG #7968: Perl DBI segfaults in connect()
Previous Message navin.pro 2013-03-18 05:31:23 BUG #7956: Installation fails saying database cluster initialization failed