]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Adjust cross-version upgrade tests for seg_out() fix master github/master
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 12 Jun 2026 22:05:25 +0000 (18:05 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 12 Jun 2026 22:05:25 +0000 (18:05 -0400)
Commit 0e1f1ed157e taught seg_out() to print the certainty indicator
on an interval's upper boundary, but it was back-patched only as far
as v14.  When upgrading from an older release, the old server prints
the one test_seg row exercising that case ('4.6 .. ~7.0') without the
indicator, so the pre- and post-upgrade dumps do not match.  Make
AdjustUpgrade.pm delete just that row; seg's comparison function does
distinguish the certainty indicators, so the otherwise identical row
'4.6 .. 7.0' is unaffected.

Back-patch to all supported branches.

Per buildfarm members crake and fairywren.

Discussion: https://postgr.es/m/5ccbdbde-6467-4a10-bf4d-0be73a05ce8d@dunslane.net

src/test/perl/PostgreSQL/Test/AdjustUpgrade.pm

index 8a0c6c98a39af6136a20206a4716f5dac576c335..dbddd41bfca0cdb3374f018c7efdc345d17597b4 100644 (file)
@@ -196,6 +196,14 @@ sub adjust_database_contents
                                'drop function if exists public.putenv(text)',
                                'drop function if exists public.wait_pid(integer)');
                }
                                'drop function if exists public.putenv(text)',
                                'drop function if exists public.wait_pid(integer)');
                }
+
+               # delete seg row that pre-14 was printed incorrectly but would now
+               # be printed correctly
+               if ($dbnames{contrib_regression_seg})
+               {
+                       _add_st($result, 'contrib_regression_seg',
+                               "delete from test_seg where s = '4.6 .. ~7.0'");
+               }
        }
 
        # user table OIDs are gone from release 12 on
        }
 
        # user table OIDs are gone from release 12 on