pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone
2+ messages / 2 participants
[nested] [flat]
Commits from this thread:
2020-08-03 eeb01e3122 8d5c632e96 995c53b449 4399909af8 d809d99cd4 6dab26bbef 6d78f219e8 Doc: fix obsolete info about allowed range of TZ offsets in timetz.
* BUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone
@ 2020-08-03 07:26 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2020-08-03 07:26 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: mailtch@163.com
The following bug has been logged on the website:
Bug reference: 16571
Logged by: osdba
Email address: mailtch@163.com
PostgreSQL version: 13beta2
Operating system: all
Description:
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)
osdba=# select '24:00:00-1559'::time with time zone;
timetz
----------------
24:00:00-15:59
(1 row)
you can input range is :
00:00:00+1559 to 24:00:00-1559
not the "00:00:00+1459 to 24:00:00-1459"
Document error or this type bug?
all version postgresql have this strange phenomenon.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone
@ 2020-08-03 14:18 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-08-03 14:18 UTC (permalink / raw)
To: mailtch@163.com; +Cc: pgsql-bugs@lists.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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-08-03 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 07:26 BUG #16571: "time with time zone" type can input '00:00:00+1559'::time with time zone PG Bug reporting form <noreply@postgresql.org>
2020-08-03 14:18 ` Tom Lane <tgl@sss.pgh.pa.us>
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