to_char function returning wrong data

Поиск
Список
Период
Сортировка
От Sreeni Survi
Тема to_char function returning wrong data
Дата
Msg-id CAD91y4RLdbXvr+oNoN++Wmn2SjxHYRJZnT95f=BPZcSO0OBTxg@mail.gmail.com
обсуждение исходный текст
Ответы Re: to_char function returning wrong data
Re: to_char function returning wrong data
Список pgsql-bugs
Hi,

Below code has caused my data to be wiped off a table as my where clause depends on the below returned value.

select to_char(current_date - interval '5 weeks','IYYYWW') ;
201953

If the number of weeks is 4 or 6 or 3 it returns correct value.

select to_char(current_date - interval '4 weeks','IYYYWW') ;   
201901

select to_char(current_date - interval '6 weeks','IYYYWW') ;   
201852

This issue can have a serious effect.

Thanks,
Sreeni

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