Fixed #23807 -- Ignored non-digits in psycopg2 version
Fixed #23945 -- Made default site use the configured SITE_ID.