Properly parse a PSQL server version, even beta versions. Fixes #6352.