Fix #23807 - Ignore psycopg2 version part if it is non-digit