BUG #7967: Wrong week number in extract function - Mailing list pgsql-bugs

From noose@noose.pl
Subject BUG #7967: Wrong week number in extract function
Date
Msg-id E1UHVLg-0003bi-Uj@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #7967: Wrong week number in extract function
Re: BUG #7967: Wrong week number in extract function
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7967
Logged by:          Pawel Kobylak
Email address:      noose@noose.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

pgsql-bugs by date:

Previous
From: navin.pro@gmail.com
Date:
Subject: BUG #7956: Installation fails saying database cluster initialization failed
Next
From: Tom Lane
Date:
Subject: Re: BUG #7968: Perl DBI segfaults in connect()