Steffen Goeldner wrote:

 > As I said, your proposal is more general - I like it.
 >
 > BTW: My Access driver returns '`':
I think this depends if you use DBD::ODBC or DBD::ADO and if you're 
using ODBC or OLEDB driver. I've not fully tested it - I only use Access 
as an example of a non-compliant DBMS - I'm sure there are 
other/better(worse) examples!

 > If a DBD Writer knows, the database does not support catalog names in
 > SQL statements, then table_info() should return NULL for TABLE_CAT.
That assumes that the DBD provides its own tables() method - most don't 
and rely on the default DBI::tables method.

 > In this case, tables() does not need TableIdentifiers()!
 > O.k., DBD::ODBC may cause troubles, because it depends on (possible
 > buggy) ODBC drivers. In this case, the user would be able to provide
 > a workaround via TableIdentifiers().
My idea is that TableIdentifiers would be set by the DBD and then the 
DBD would not need to override the DBI::tables method. But as you point 
out it also allows the user to override the default behavour on a per 
connection basis (rather than each time $dbh->tables is called).

 > BTW: My Access driver allows that:
 >
 > $sth = $dbh->prepare('SELECT * FROM `C:\tmp\test`.`test`');
Never tested it - just assumes it wouldn't work!

But my point is that tables() makes some assumptions and not others - it 
quotes some identifiers and not others, it includes some identifiers and 
not others!

Thanks for your input.

-- 
Simon Oliver

Reply via email to