agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Bruce Momjian <bruce@momjian.us>
To: Kacper Kuras <kacperkuras@hotmail.com>
Cc: pgsql-docs@lists.postgresql.org <pgsql-docs@lists.postgresql.org>
Subject: Re: 8.5.1. Date/Time Input
Date: Fri, 18 Sep 2026 11:48:53 -0400
Message-ID: <aq1dZXAGxsprFQZ-@momjian.us> (raw)
In-Reply-To: <VI0P193MB3111F91B790EDF55FF2FD994BF872@VI0P193MB3111.EURP193.PROD.OUTLOOK.COM>
References: <178897820483.2258529.4862563749043725162@wrigleys.postgresql.org>
<aqxFm0lsIiHIJk3A@momjian.us>
<VI0P193MB3111F91B790EDF55FF2FD994BF872@VI0P193MB3111.EURP193.PROD.OUTLOOK.COM>
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 <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
view thread (7+ messages) latest in thread
Message-ID: <aq1dZXAGxsprFQZ-@momjian.us>
Permalink: ../aq1dZXAGxsprFQZ-@momjian.us/
Also on: postgresql.org/message-id/aq1dZXAGxsprFQZ-@momjian.us
reply
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 using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, kacperkuras@hotmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: 8.5.1. Date/Time Input
In-Reply-To: <aq1dZXAGxsprFQZ-@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox