Re: Unexpected interval comparison
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Cc: adrian.klaver@aklaver.com, frazer@frazermclean.co.uk,
pgsql-general@postgresql.org
Date: 2017-04-06T03:31:40Z
Lists: pgsql-general
Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp> 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
Commits
-
Fix integer-overflow problems in interval comparison.
- fd52b8834330 9.6.3 landed
- d68a2b20ae2c 9.5.7 landed
- 8851bcf8813b 9.4.12 landed
- df1a699e5ba3 10.0 landed