mirror of
https://github.com/postgres/postgres.git
synced 2025-06-05 00:02:04 -04:00
Fix version check in 002_pg_upgrade.pl.
Commit f696c0cd5f 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
This commit is contained in:
parent
6ee3261e9b
commit
32dd2c1eff
@ -92,10 +92,6 @@ my $oldnode =
|
|||||||
PostgreSQL::Test::Cluster->new('old_node',
|
PostgreSQL::Test::Cluster->new('old_node',
|
||||||
install_path => $ENV{oldinstall});
|
install_path => $ENV{oldinstall});
|
||||||
|
|
||||||
# Numeric major version of old cluster, ignoring "devel" suffix.
|
|
||||||
# Needed for testing upgrades from development version to itself.
|
|
||||||
my $old_major_version = int($oldnode->pg_version =~ s/devel//rg);
|
|
||||||
|
|
||||||
my %node_params = ();
|
my %node_params = ();
|
||||||
|
|
||||||
# To increase coverage of non-standard segment size and group access without
|
# To increase coverage of non-standard segment size and group access without
|
||||||
@ -118,10 +114,10 @@ my $original_locale = "C";
|
|||||||
my $original_datlocale = "";
|
my $original_datlocale = "";
|
||||||
my $provider_field = "'c' AS datlocprovider";
|
my $provider_field = "'c' AS datlocprovider";
|
||||||
my $old_datlocale_field = "NULL AS datlocale";
|
my $old_datlocale_field = "NULL AS datlocale";
|
||||||
if ($old_major_version >= 15 && $ENV{with_icu} eq 'yes')
|
if ($oldnode->pg_version >= 15 && $ENV{with_icu} eq 'yes')
|
||||||
{
|
{
|
||||||
$provider_field = "datlocprovider";
|
$provider_field = "datlocprovider";
|
||||||
if ($old_major_version >= 17)
|
if ($oldnode->pg_version >= '17devel')
|
||||||
{
|
{
|
||||||
$old_datlocale_field = "datlocale";
|
$old_datlocale_field = "datlocale";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user