Backport !3993 (merged) to 3.14 branch.
With the 10.x release, PostgreSQL upstream started encoding the version
as MMmmmm
where M
is major and m
is minor. Prior to that, MMmmPP
was used where P
was the patch number. Detect this difference and
decode it based on the used encoding.
Fixes: #19912 (closed)