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  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Re: to_char function returning wrong data  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Axel Andersson
Дата:
Сообщение: Re: BUG #15608: Index is used for an inherit table but not for thetable with the index
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #15602: pg_dump archive items not in correct section order