BUG #4372: TO_DATE with ISO week and day

Поиск
Список
Период
Сортировка
От Kees Westerlaken
Тема BUG #4372: TO_DATE with ISO week and day
Дата
Msg-id 200808221332.m7MDWpVt003415@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4372: TO_DATE with ISO week and day  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4372
Logged by:          Kees Westerlaken
Email address:      kees.westerlaken@valuecare.nl
PostgreSQL version: 8.3.3
Operating system:   Windows
Description:        TO_DATE with ISO week and day
Details:

The TO_DATE conversion with ISO week (IW) and ISO day (ID) format accepts
invalid values and sometimes returns wrong result.

select to_date('2008-31-4','IYYY-IW-ID')
results in "2008-07-31", which is correct

The valid values for IW are 1-7, however:
select to_date('2008-31-8','IYYY-IW-ID')
results in "2008-08-04" of which you could argue if it is correct.

However:
select to_date('2008-31-10','IYYY-IW-ID')
results in "2008-07-28", which is not correct

And even worse: if you use the IW and ID format in an older version it
works, but the result is wrong.
select to_date('2008-31-4','IYYY-IW-ID')
in version 8.2.6 results in "2004-07-26", which is wrong.

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: range value problem with double precision [PG 8.3.3]
Следующее
От: "Bernard Stewe"
Дата:
Сообщение: Installation Problems