Tim Bunce <[EMAIL PROTECTED]> schrieb/wrote:
> The DBI has a (currently private) method to determine the underlying
> database type. It was borrowed from DBIx::AnyDBD. Take a look at
> _dbtype_names() in DBI.pm

Yeah, I just updated DT::F::DBI to use that function.

> I intend to extend it to use $dbh->get_info(17); (=SQL_DBMS_NAME),
> and give it a public api, in the medium term.

One of the problems I can see is that it just returns the type ODBC
returns, which is already a problem for MySQL (returns /^mysqld-.*/[1])  
and PostgreSQL (returns 'PostgreSQL', not 'Pg'[1]).
I'm not sure what DBD::PgPP and DBD::PgSPI return, either.

Maybe DBI::_dbtype_names should normalise these DBMS names (e.g. to the  
corresponding DBD::* driver name, if one exists).

BTW, is there a CVS server for DBI somewhere?

Claus

[1] I have only looked at unixODBC's source code and not installed it,
    so I might be wrong there.
-- 
http://www.faerber.muc.de

Reply via email to