Skip to content

Commit 32dd2c1

Browse files
committed
Fix version check in 002_pg_upgrade.pl.
Commit f696c0c tried to account for the version in a way that includes development versions, but it was broken. Fix with suggestion from Tom Lane. Discussion: https://postgr.es/m/1553991.1710191312@sss.pgh.pa.us Reported-by: Tom Lane
1 parent 6ee3261 commit 32dd2c1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/bin/pg_upgrade/t/002_pg_upgrade.pl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,6 @@ sub filter_dump
9292
PostgreSQL::Test::Cluster->new('old_node',
9393
install_path => $ENV{oldinstall});
9494

95-
# Numeric major version of old cluster, ignoring "devel" suffix.
96-
# Needed for testing upgrades from development version to itself.
97-
my $old_major_version = int($oldnode->pg_version =~ s/devel//rg);
98-
9995
my %node_params = ();
10096

10197
# To increase coverage of non-standard segment size and group access without
@@ -118,10 +114,10 @@ sub filter_dump
118114
my $original_datlocale = "";
119115
my $provider_field = "'c' AS datlocprovider";
120116
my $old_datlocale_field = "NULL AS datlocale";
121-
if ($old_major_version >= 15 && $ENV{with_icu} eq 'yes')
117+
if ($oldnode->pg_version >= 15 && $ENV{with_icu} eq 'yes')
122118
{
123119
$provider_field = "datlocprovider";
124-
if ($old_major_version >= 17)
120+
if ($oldnode->pg_version >= '17devel')
125121
{
126122
$old_datlocale_field = "datlocale";
127123
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy