Strange timezone 'math' in 9.6.8

From: Ervin Weber <webervin(at)gmail(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Strange timezone 'math' in 9.6.8
Date: 2018-03-28 09:24:38
Message-ID: CAFC4ZFjoVMbFqgj9O0Bz+YSnrfzHrEFWHi-fa1bmWmadfnN6iw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Seems that PostgreSQL does do math inside invalid time zone names,
without reporting any errors to client if time zone name has sign and
number inside range.

staging=# show server_version;
server_version
----------------
9.6.8
(1 row)

staging=# select now(), now() at time zone 'fubar+167';
now | timezone
-------------------------------+----------------------------
2018-03-28 09:16:25.897444+00 | 2018-03-21 10:16:25.897444
(1 row)

staging=# select now(), now() at time zone 'fubar+168';
ERROR: time zone "fubar+168" not recognized

According to http://sqlfiddle.postgrespro.ru can be reproduced in
11devel and 10.3 (Ubuntu 10.3-1.pgdg16.04+1)

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2018-03-28 11:50:46 Re: Strange timezone 'math' in 9.6.8
Previous Message Tom Lane 2018-03-28 05:26:59 Re: postgres 9.6.8 to 10 on Ubuntu 16.04.4 LTS --- tsearch2 unloadable...