Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvy9G-0000ze-DM for pgsql-general@arkaria.postgresql.org; Thu, 06 Apr 2017 03:31:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cvy9F-0002M1-EJ for pgsql-general@arkaria.postgresql.org; Thu, 06 Apr 2017 03:31:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvy9E-0002Kf-74 for pgsql-general@postgresql.org; Thu, 06 Apr 2017 03:31:48 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cvy9B-0006vb-Ly for pgsql-general@postgresql.org; Thu, 06 Apr 2017 03:31:47 +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 v363Veux015485; Wed, 5 Apr 2017 23:31:40 -0400 From: Tom Lane To: Kyotaro HORIGUCHI cc: adrian.klaver@aklaver.com, frazer@frazermclean.co.uk, pgsql-general@postgresql.org Subject: Re: Unexpected interval comparison In-reply-to: <20170406.120745.33533430.horiguchi.kyotaro@lab.ntt.co.jp> References: <20170405.200723.102041631.horiguchi.kyotaro@lab.ntt.co.jp> <27982.1491421870@sss.pgh.pa.us> <385.1491426413@sss.pgh.pa.us> <20170406.120745.33533430.horiguchi.kyotaro@lab.ntt.co.jp> Comments: In-reply-to Kyotaro HORIGUCHI message dated "Thu, 06 Apr 2017 12:07:45 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15483.1491449500.1@sss.pgh.pa.us> Date: Wed, 05 Apr 2017 23:31:40 -0400 Message-ID: <15484.1491449500@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-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Kyotaro HORIGUCHI writes: > By the way the adt directory is, as suggested by the name, > storing files with names of SQL data types so "int128.c" among > then seems incongruous. Is "int128_test.c" acceptable? int16.c > will be placed there in case we support int16 or hugeint on SQL. After further reflection I've decided to put int128.h in src/include/common/, thinking that maybe someday it will be useful on client side too. Also I've changed the test harness file to be src/tools/testint128.c, so that it won't be confused with code meant to be part of the backend. > Back to 9.5 seems reasonable to me. I poked around and noticed that before 9.4, we did not attempt to guard against overflows in interval calculations at all. So backpatch to 9.4 seems pretty defensible. The non-HAVE_INT128 code works fine in 9.4. I've just about finished adjusting the patch for the back branches, and will push in a little bit. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general