Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X9Qk8-0000Nj-Au for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Jul 2014 03:27:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X9Qk7-0005Y7-QT for pgsql-bugs@arkaria.postgresql.org; Tue, 22 Jul 2014 03:27:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9Qk6-0005VY-7s for pgsql-bugs@postgresql.org; Tue, 22 Jul 2014 03:27:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X9Qjy-0006GQ-Tu for pgsql-bugs@postgresql.org; Tue, 22 Jul 2014 03:27:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s6M3RiDt005101; Mon, 21 Jul 2014 23:27:44 -0400 From: Tom Lane To: David G Johnston cc: pgsql-bugs@postgresql.org Subject: Re: Re: BUG #11014: Postgres can be put into an error state by setting invalid timezone. In-reply-to: <1405987796684-5812301.post@n5.nabble.com> References: <20140721194918.27765.11913@wrigleys.postgresql.org> <24902.1405974941@sss.pgh.pa.us> <1405977349153-5812283.post@n5.nabble.com> <28029.1405983668@sss.pgh.pa.us> <1405987796684-5812301.post@n5.nabble.com> Comments: In-reply-to David G Johnston message dated "Mon, 21 Jul 2014 17:09:56 -0700" Date: Mon, 21 Jul 2014 23:27:44 -0400 Message-ID: <5100.1405999664@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David G Johnston writes: > Though pondering this additionally the actual coding to make -0400 be > interpreted as "-4:00" would indeed be a feature enhancement - though > accepting a result of 400 I would argue is a bug even if it is one we are > going to choose to live with in back branches for compatibility reasons. We > seem to already agree that it should at least error out on a going-forward > basis. The fact that it crashes is indisputably a bug (fixed as of a few minutes ago). However, whether SET TIMEZONE = '-0400' should be read as setting the UTC offset to 400 hours, or 400 minutes, or 400 seconds, or 4 hours, or who knows what else, is not a bug, it's a definitional disagreement. As a comparison point, the syntax SET TIME ZONE INTERVAL '-0400' is specified in the SQL standard, and unless I'm totally misreading it, the standard requires that to be interpreted as 400 minutes. (The standard's examples of useful values look more like '-04:00'.) Now that might look silly on its face, but if the string is '-180' then reading it as UTC minus 3 hours doesn't seem so silly. Anyway, we could certainly have a discussion about changing the interpretation, but it would not be a back-patchable bug fix IMO. There's a non-negligible risk of breaking apps that worked before. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs