As the number of possible drivers grown, it would be interesting to introduce one new calculated CFG attribute.
Call it $CFG->dbfamily and it will contain neutral names for the adodb driver being used. It will be calculated in setup.php, potentially (need to be analysed) in configure_dbconnection() and potential values will be:
mysql, postgres, mssql, oracle
Then , use that variable in a lot of places where we are using CFG->dbtype, it will reduce the complexity of code and will make easy the adoption of new drivers belonging to the same family.
Also, enviroment stuff could use this new variable.