Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5dt1-0006vk-Ee for pgsql-docs@arkaria.postgresql.org; Mon, 29 Dec 2014 17:13:43 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Y5dt0-0001XQ-MM for pgsql-docs@arkaria.postgresql.org; Mon, 29 Dec 2014 17:13:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Y5dt0-0001XG-5E for pgsql-docs@postgreSQL.org; Mon, 29 Dec 2014 17:13:42 +0000 Received: from mail.wordtothewise.com ([184.105.179.154]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Y5dsv-0006vh-IF for pgsql-docs@postgreSQL.org; Mon, 29 Dec 2014 17:13:41 +0000 Received: from satsuke.wordtothewise.com (204.11.227.194.static.etheric.net [204.11.227.194]) by mail.wordtothewise.com (Postfix) with ESMTPSA id E23A880D0D for ; Mon, 29 Dec 2014 09:13:34 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: The IYYY mess again From: Steve Atkins In-Reply-To: <5888.1419865569@sss.pgh.pa.us> Date: Mon, 29 Dec 2014 09:13:33 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <59DE6D33-8AE5-4355-BC1D-4911CD2EAD34@blighty.com> References: <5888.1419865569@sss.pgh.pa.us> To: pgsql-docs@postgreSQL.org X-Mailer: Apple Mail (2.1878.6) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org On Dec 29, 2014, at 7:06 AM, Tom Lane wrote: > In bug #12367 > http://www.postgresql.org/message-id/20141229031218.8013.51171@wrigleys.p= ostgresql.org > we see yet another iteration of somebody trying to combine to_char's > IYYY specifier with regular Gregorian MM/DD fields. >=20 > It occurs to me that this is largely our own fault, because the fine > manual just defines IYYY as "ISO year". I'm sure the typical newbie > thought process is "that sounds like a standard year, I'll use that". > There is a warning against combining IYYY with MM/DD, but it's buried > in trivia far down the page. >=20 > I did a bit of googling and came across > http://en.wikipedia.org/wiki/ISO_week_date > in which this construct is called an "ISO week-numbering year". >=20 > Not having a copy of ISO 8601, I'm not sure if that's the standard's > terminology; but ISTM that if we consistently referred to the Ixxx > format specifiers as "ISO week-numbering foo" then this type of error > might become a little less attractive. >=20 > Objections, better ideas? I've seen this problem a few times on IRC too. An explicit warning / cross reference on IYYY that the user almost certainly wants YYYY instead might be even better. Cheers, Steve --=20 Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs