Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7aqg-00000000VHG-0EAa for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2026 15:50:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1x7ape-000000023HU-3XsA for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2026 15:48:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7ape-000000023HM-2Ket for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2026 15:48:58 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x7apb-000000003Xv-2yXg for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2026 15:48:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-ID:Content-Description; bh=2y0F/2T66bkwX55N6BhXcGTyoV4Dl6kpGgz0ARWmOSc=; b=BTn3hZ875X5XpGvrdlLJgnm4Ka BerzzP9wQnPgg14z9Xt+ANhlkIQzYpQMJf5rbKSbE+V8/fbUoaOfLHmiJ1eJC9UE11kF1wIQ9qpjH AygNsMvT5mGodCQ0USndkoS6Swcnrv2zadJhdDUAs1bd1vzm3Yxtw03k0+hg8s9Pz3gY+ur61zQa1 jpAvigN6yDIa6ZulrGFjTq15E7DCHHb62okcUvBMbRXKMoCmQZjwbGznsNmBXr7+stx2emtSuRHgD 2I4FG8HTNjkowOFSnU2TvsIy9bliel/rh+F1z9HRrpIFZWUehikVH2+5igxQKCLIYgfXlJW5FMK/9 GY3qlAmg==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1x7apZ-00000003VzL-0UwJ; Fri, 18 Sep 2026 11:48:53 -0400 Date: Fri, 18 Sep 2026 11:48:53 -0400 From: Bruce Momjian To: Kacper Kuras Cc: "pgsql-docs@lists.postgresql.org" Subject: Re: 8.5.1. Date/Time Input Message-ID: References: <178897820483.2258529.4862563749043725162@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Sep 18, 2026 at 02:50:20PM +0000, Kacper Kuras wrote: > Thanks. In the patch, "without a sign" only holds for years after > 9999: dropping the minus from -0001-01-02 gives 0001-01-02, which is > 1 AD, not 2 BC. Perhaps: > > (ISO 8601 writes years after 9999 with a leading plus sign, and > years before 1 AD from a year zero, so 0000 is 1 BC and -0001 is > 2 BC. PostgreSQL accepts neither; write 10000-01-02 and > 0002-01-02 BC instead.) Looking at the wiki page again, I see: To represent years before 0000 or after 9999, the standard also permits the expansion of the year representation but only by prior agreement between the sender and the receiver.[25] An expanded year representation [±YYYYY] must have an agreed-upon number of extra year digits beyond the four-digit minimum, and it must be prefixed with a + or - sign[26] instead of the more common AD/BC (or CE/BCE) notation; by convention 1 BC is labelled +0000, 2 BC is labeled -0001, and so on.[27] The "agreement between the sender and the receiver" makes it seem we don't need to document that we don't support signs on the years. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future.