]> granicus.if.org Git - postgresql/commit
Fix interval test, which was broken for floating-point timestamps.
authorJeff Davis <jdavis@postgresql.org>
Wed, 7 May 2014 02:35:24 +0000 (19:35 -0700)
committerJeff Davis <jdavis@postgresql.org>
Wed, 7 May 2014 04:38:00 +0000 (21:38 -0700)
commit8398f3736c44cc050ad61856e0b403dcbcb5254d
tree3a98b9cfb1cfa841eddb26f6b7d85a82aeecead2
parent1d033d30540c036d3ead1e0a42a16a2c761f9582
Fix interval test, which was broken for floating-point timestamps.

Commit 4318daecc959886d001a6e79c6ea853e8b1dfb4b introduced a test that
couldn't be made consistent between integer and floating-point
timestamps.

It was designed to test the longest possible interval output length,
so removing four zeros from the number of hours, as this patch does,
is not ideal. But the test still has some utility for its original
purpose, and there aren't a lot of other good options.

Noah Misch suggested a different approach where we test that the
output either matches what we expect from integer timestamps or what
we expect from floating-point timestamps. That seemed to obscure an
otherwise simple test, however.

Reviewed by Tom Lane and Noah Misch.
src/test/regress/expected/interval.out
src/test/regress/sql/interval.sql