Re: Unexpected interval comparison - Mailing list pgsql-general

From Tom Lane
Subject Re: Unexpected interval comparison
Date
Msg-id 15484.1491449500@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unexpected interval comparison  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List 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


pgsql-general by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Unexpected interval comparison
Next
From: Patrick B
Date:
Subject: regexp_matches where clause - PG 9.1