From: Tom Lane <tgl@sss.pgh.pa.us>
To: Shulgin, Oleksandr <oleksandr.shulgin@zalando.de>
Cc: kees.westerlaken@valuecare.nl, Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13845: Incorrect week number
Date: Tue, 05 Jan 2016 10:10:53 -0500
Message-ID: <16668.1452006653@sss.pgh.pa.us> (raw)
In-Reply-To: <CACACo5TnQ9G_8CBf=xx105fSL12KDkO0MXWNytST_UC5p-u+zw@mail.gmail.com>
References: <20160105105924.1114.70550@wrigleys.postgresql.org>
<CACACo5RY7TK4C7hVBKX1-C=BZgmY6D3rnTKMcAhYO=J+CFwNWg@mail.gmail.com>
<CACACo5TnQ9G_8CBf=xx105fSL12KDkO0MXWNytST_UC5p-u+zw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
"Shulgin, Oleksandr" <oleksandr.shulgin@zalando.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
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, oleksandr.shulgin@zalando.de
Subject: Re: BUG #13845: Incorrect week number
In-Reply-To: <16668.1452006653@sss.pgh.pa.us>
References: <20160105105924.1114.70550@wrigleys.postgresql.org> <CACACo5RY7TK4C7hVBKX1-C=BZgmY6D3rnTKMcAhYO=J+CFwNWg@mail.gmail.com> <CACACo5TnQ9G_8CBf=xx105fSL12KDkO0MXWNytST_UC5p-u+zw@mail.gmail.com> <16668.1452006653@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox