From: Tom Lane <tgl@sss.pgh.pa.us>
To: mailtch@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone
Date: Mon, 03 Aug 2020 10:18:00 -0400
Message-ID: <2329418.1596464280@sss.pgh.pa.us> (raw)
In-Reply-To: <16571-eb7501598de78c8a@postgresql.org>
References: <16571-eb7501598de78c8a@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> In Document(https://www.postgresql.org/docs/current/datatype-datetime.html),
> "time with time zone" range is: 00:00:00+1459 to 24:00:00-1459
> but you can input:
> osdba=# select '00:00:00+1559'::time with time zone;
> timetz
> ----------------
> 00:00:00+15:59
> (1 row)
Hmm, the code is quite clear about it:
/*
* We allow numeric timezone offsets up to 15:59:59 either way from Greenwich.
* Currently, the record holders for wackiest offsets in actual use are zones
* Asia/Manila, at -15:56:00 until 1844, and America/Metlakatla, at +15:13:42
* until 1867. If we were to reject such values we would fail to dump and
* restore old timestamptz values with these zone settings.
*/
#define MAX_TZDISP_HOUR 15 /* maximum allowed hour part */
Apparently this documentation reference got overlooked the last time
we changed that :-(. Will fix, thanks for the report!
regards, tom lane
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-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mailtch@163.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone
In-Reply-To: <2329418.1596464280@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox