Re: Postgresql likes Tuesday...

Поиск
Список
Период
Сортировка
От Hannu Krosing
Тема Re: Postgresql likes Tuesday...
Дата
Msg-id 1033418798.2751.8.camel@rh72.home.ee
обсуждение исходный текст
Ответ на Re: Postgresql likes Tuesday...  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Postgresql likes Tuesday...  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 2002-10-01 at 03:31, Tom Lane wrote:
> Offhand this seems kinda inconsistent to me --- I'd expect 
> 
> regression=# select extract(week from date '2002-09-30');
>  date_part
> -----------
>         40
> (1 row)
> 
> to produce 39, not 40, on the grounds that the first day of Week 40
> is tomorrow not today.  Alternatively, if today is the first day of
> Week 40 (as EXTRACT(week) seems to think), then ISTM that the to_date
> expression should produce today not tomorrow.
> 
> I notice that 2001-12-31 is considered part of the first week of 2002,
> which is also pretty surprising:

There are at least 3 different ways to start week numbering:

1. from first week with any days in current year

2. from first full week in current year

3. from first week with thursday in current year

perhaps more...

I suspect it depends on locale which should be used.

---------------
Hannu




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: (Fwd) Re: Any Oracle 9 users? A test please...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Postgresql likes Tuesday...