Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1isTZS-0007Ws-J9 for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jan 2020 15:30:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1isTZQ-0000zM-Pn for pgsql-bugs@arkaria.postgresql.org; Fri, 17 Jan 2020 15:30:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1isTZQ-0000to-HR for pgsql-bugs@lists.postgresql.org; Fri, 17 Jan 2020 15:30:00 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1isTZN-0008Gb-Qh for pgsql-bugs@lists.postgresql.org; Fri, 17 Jan 2020 15:29:59 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 00HFTqeV027854; Fri, 17 Jan 2020 10:29:53 -0500 From: Tom Lane To: Fabien COELHO cc: szx9231@gmail.com, PostgreSQL Bugs Subject: Re: BUG #16216: the result of to_date function with negative year number not same as BC year number In-reply-to: References: <16216-68da08087f3aeb78@postgresql.org> <26771.1579273182@sss.pgh.pa.us> Comments: In-reply-to Fabien COELHO message dated "Fri, 17 Jan 2020 16:15:15 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <27852.1579274992.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 17 Jan 2020 10:29:52 -0500 Message-ID: <27853.1579274992@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Fabien COELHO writes: >> I'm pretty sure that's intentional; if you specify two or fewer >> year digits, a year between 1970 and 2069 is presumed to be meant. > Hmmm. Ok, I see. > If I write a fuzzy "31/12/01", I'm pretty okay with 2001-12-31. but if I > write '1 AD', I would expect '1 AD'. Yeah, a case could be made for applying that rule only when there's exactly two year digits. OTOH, it's been like this for a very long time with few complaints. Besides, it'd still be weird when you write "11 AD", so really people who are dealing with such dates need to learn to write four year digits. regards, tom lane