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 1x7bMe-00000000VbO-0z1a for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2026 16:23:04 +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 1x7bMc-00000002EmY-0Sj6 for pgsql-docs@arkaria.postgresql.org; Fri, 18 Sep 2026 16:23:02 +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 1x7bMb-00000002EmQ-3hxO for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2026 16:23:01 +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 1x7bMZ-000000003tV-15Et for pgsql-docs@lists.postgresql.org; Fri, 18 Sep 2026 16:23:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2026010100; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=3Zhr4OfiJD1w2kaZ6rDaGbtEuLWkfIrn2p0numI3fLk=; b=hokdj RALoTfIQGSQ8hUVTghSVo0hJPj279tnt+IRT3dLC4jWYGu7VnG0PxgHUd7OCAyPjfv1KnPt0tC2qp T8cvqQIuUXgGxb1O6P07JMYqatr9R3dh4HraCxb3kQnxKAE6y5Lpcks9yDqoGIhy1hb5Fx1sJiTuk UHuykxHRya0o1bnMJPY8douLt1H7FmzTsWAMIi4jBBZe7EMtsP14BRtcQhQXHsraaRzyGT4hlAJTQ NCQBlvGKnIzTOZaggUiS0wDsZOBmZevUrw8QW8yvTDDpDtTScdKNFWrOswxgXTumd+9RP7Xl6w491 AknzvD3rvFNpyJ2wfxuyC3mcaO+kw==; Received: from bruce by momjian.us with local (Exim 4.98.2) (envelope-from ) id 1x7bMX-00000003cc2-28y6; Fri, 18 Sep 2026 12:22:57 -0400 Date: Fri, 18 Sep 2026 12:22:57 -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: multipart/mixed; boundary="vYAoctrmBIMfUrZx" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --vYAoctrmBIMfUrZx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Sep 18, 2026 at 04:09:39PM +0000, Kacper Kuras wrote: > > 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. > > Agreement needs each side to state its terms, though, and PostgreSQL > states its terms in the documentation. It already does for the other > by-agreement range: ISO 8601 leaves years before 1583 to agreement, > and B.6 settles them - proleptic Gregorian for all dates - if you > think to look in an appendix on calendar history. For a leading sign > there is only B.1's tokenizing rule, "either a numeric time zone or > a special field", which says nothing about years. So a client finds > out by trying: -0001-01-02, the wiki's own 2 BC, is refused as > invalid input syntax, and +10000-01-02 as a time zone displacement. How about this patch? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Do not let urgent matters crowd out time for investment in the future. --vYAoctrmBIMfUrZx Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ISO8601.diff" diff --git a/doc/src/sgml/datatype.sgml b/doc/src/sgml/datatype.sgml index 89985ab7b16..dd7af9fda7a 100644 --- a/doc/src/sgml/datatype.sgml +++ b/doc/src/sgml/datatype.sgml @@ -1879,6 +1879,8 @@ MINUTE TO SECOND Date and time input is accepted in almost any reasonable format, including ISO 8601, SQL-compatible, traditional POSTGRES, and others. + (PostgreSQL does not support ISO + 8601-optional signed years.) For some formats, ordering of day, month, and year in date input is ambiguous and there is support for specifying the expected ordering of these fields. Set the parameter --vYAoctrmBIMfUrZx--