Thread: bug?

bug?

From
Minghann Ho
Date:
The following SELECT are errors?!

tpcr=# select extract (week from date '2000-01-01');date_part
-----------       52
(1 row)

tpcr=# select extract (week from date '2000-01-02');date_part
-----------       52
(1 row)

Please check ...

thanks
Hans


Re: bug?

From
Tom Lane
Date:
Minghann Ho <mho@mcs.vuw.ac.nz> writes:
> The following SELECT are errors?!

No, they're not.  PG follows the ISO definition of week numbers:
Monday is the first day of the week, and the first week of a year
is the first one containing a Thursday.
        regards, tom lane