Update a query in pg_upgrade