From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de> |
Cc: | kees(dot)westerlaken(at)valuecare(dot)nl, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13845: Incorrect week number |
Date: | 2016-01-05 15:10:53 |
Message-ID: | 16668.1452006653@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de> writes:
> Scratch that, I'm confused about YYYY format, has to use IYYY instead.
Exactly. There's no bug here, it's just that you have to use IYYY
together with IW if you want sensible results.
Per the fine manual:
Caution: While to_date will reject a mixture of Gregorian and ISO
week-numbering date fields, to_char will not, since output format
specifications like YYYY-MM-DD (IYYY-IDDD) can be useful. But avoid
writing something like IYYY-MM-DD; that would yield surprising results
near the start of the year.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | gnkna | 2016-01-05 15:15:26 | BUG #13847: WARNING: skipping "pg_toast_" --- cannot vacuum indexes, views, or special system tables VACUUM |
Previous Message | paul | 2016-01-05 15:02:27 | BUG #13846: INSERT ON CONFLICT consumes sequencers on conflicts |