Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2bIE-0005gf-62 for pgsql-bugs@arkaria.postgresql.org; Mon, 03 Aug 2020 14:18:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k2bIC-0006Og-0g for pgsql-bugs@arkaria.postgresql.org; Mon, 03 Aug 2020 14:18:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2bIB-0006Nh-Qp for pgsql-bugs@lists.postgresql.org; Mon, 03 Aug 2020 14:18:19 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k2bI5-0002Q9-6y for pgsql-bugs@lists.postgresql.org; Mon, 03 Aug 2020 14:18:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 073EI0Sj2329419; Mon, 3 Aug 2020 10:18:00 -0400 From: Tom Lane 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 In-reply-to: <16571-eb7501598de78c8a@postgresql.org> References: <16571-eb7501598de78c8a@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Mon, 03 Aug 2020 07:26:09 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2329417.1596464280.1@sss.pgh.pa.us> Date: Mon, 03 Aug 2020 10:18:00 -0400 Message-ID: <2329418.1596464280@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk PG Bug reporting form 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