Re: pgsql: Catalog changes preparing for builtin collation provider. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Catalog changes preparing for builtin collation provider.
Date
Msg-id 1553991.1710191312@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Catalog changes preparing for builtin collation provider.  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: pgsql: Catalog changes preparing for builtin collation provider.
List pgsql-committers
Jeff Davis <pgsql@j-davis.com> writes:
> My commit adds a line using the s/// operator.

Oh, independently of the empty-pattern problem: what you added is

+# 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);

Surely this will break the moment we enter beta.  Rather than
trying to fix that directly, what we should be doing is realizing
that you've reinvented -- badly -- the facilities provided by
the PostgreSQL::Version package.  The code you changed,

    if ($oldnode->pg_version >= 15 && $ENV{with_icu} eq 'yes')

was perfectly correct as it stood, because pg_version is a
PostgreSQL::Version object.  Why did you feel a need to
editorialize on that?

            regards, tom lane



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Add tests for libpq query cancellation APIs
Next
From: Jeff Davis
Date:
Subject: pgsql: Fix 002_pg_upgrade.pl.