Обсуждение: bug?

Поиск
Список
Период
Сортировка

bug?

От
Minghann Ho
Дата:
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?

От
Tom Lane
Дата:
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