pgsql: Fix timestamp range handling in regression tests of modules/comm

Started by Michael Paquierabout 6 years ago1 messagescomitters
Jump to latest
#1Michael Paquier
michael@paquier.xyz

Fix timestamp range handling in regression tests of modules/commit_ts/

Switching the regression tests to use tstzrange() has proved to not be a
good idea for environments where the timestamp precision is low, as
internal range checks exclude the upper bound. So, if the commit
timestamp of a transaction matched with now() from the next query,
the test would fail. This changes to use two bound checks instead of
the range function, where the upper bound is inclusive.

Per buildfarm member jacana.

Discussion: /messages/by-id/20200712122507.GD21680@paquier.xyz

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5bfe6a3c485d3259f59fa2d2e1d34dea1a3baeba

Modified Files
--------------
.../commit_ts/expected/commit_timestamp.out | 49 ++++++++++++----------
.../commit_ts/expected/commit_timestamp_1.out | 19 ++++++---
.../modules/commit_ts/sql/commit_timestamp.sql | 19 ++++++---
3 files changed, 54 insertions(+), 33 deletions(-)