Fixed #23807 -- Ignored non-digits in psycopg2 version