]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Remove gratuitous environment dependency in 002_types.pl test.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Sep 2021 20:23:10 +0000 (16:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 30 Sep 2021 20:23:21 +0000 (16:23 -0400)
commitafc6081f6ea8fa053dafe14e609d1d8e885410f8
treec0051f07a887c010c1fc274f0fb3b83f1162c36a
parente3731bac52cf049bed965aa4f96cb073ed044b68
Remove gratuitous environment dependency in 002_types.pl test.

Computing related timestamps by subtracting "N days" is sensitive
to the prevailing timezone, since we interpret that as "same local
time on the N'th prior day".  Even though the intervals in question
are only two to four days, through remarkable bad luck they managed
to cross the end of Ramadan in 2014, causing the test's output to
change if timezone is set to Africa/Casablanca.  (Maybe in other
Muslim areas as well; I didn't check.)  There's absolutely no reason
for this test to exercise interval subtraction, so just get rid of
that and use plain timestamptz constants representing the intended
values.

Per report from Andres Freund.  Back-patch to v10 where this test
script came in.

Discussion: https://postgr.es/m/20210930183641.7lh4jhvpipvromca@alap3.anarazel.de
src/test/subscription/t/002_types.pl