pgsql: Fix version comparison in Version.pm

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix version comparison in Version.pm
Date: 2022-11-18 13:49:42
Message-ID: E1ow1kT-000kHU-Ls@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix version comparison in Version.pm

Version strings with unequal numbers of parts were being compared
incorrectly. We cure this by treating a missing part in the shorter
version as 0.

per complaint from Jehan-Guillaume de Rorthais, but the fix is mine, not
his.

Discussion: https://postgr.es/m/20220628225325.53d97b8d@karst

Backpatch to release 14 where this code was introduced.

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/038512f71ea807d6c2b8e519f2416a9a5283d9bf

Modified Files
--------------
src/test/perl/PostgresVersion.pm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-11-18 15:08:37 pgsql: Clean up SQL code indentation in test file
Previous Message Alvaro Herrera 2022-11-18 11:54:40 pgsql: Fix typo