On Mon, 29 Nov 2004, Hans Schou wrote:
> But making dbi:// a default prefix will probably restrict the use of
> DBURL to only DBI. It is not realistic to think that MySQL and
> PostgreSQL would implement such a naming scheme, where as the original
> idea might be accepted.

Considering that it sounds like you want to embed your DBURL 
implementation into the DBI interface spec itself, then why is 
DBI-specificity a problem?  The fact that it is built in means they are 
tied.  As for what MySQL and PostgreSQL implement, would not the DBD 
module for those respective databases be transforming the argument to 
connect() anyway to meet their database engine's needs?  In my opinion, 
the DBI interface's main job is to define a 
standardized-as-much-as-possible interface for all DBD drivers to follow, 
and/or otherwise dispatch to the correct DBD module that can interpret the 
rest on its own terms.

That said ...

>       protocol://[[user[:[EMAIL PROTECTED]:port][/[database[/]]]
> to
>       dbi://[[user[:[EMAIL PROTECTED]:port]/driver[/[database[/]]]

I still support the idea of having the driver-specifying info on the left 
side of the "://".  Essentially, take Hans' format as it is, but interpret 
"protocol" to mean "the name of the DBD module to use".  Aka, put the 
string that would go in Tim's "driver" portion and use it as the 
"protocol"; to deal with name-space issues, the "protocol" could look like 
"DBI:foo", such as the first argument to connect() already is.

> The reason for having the DBMS protocol up front was inspired by: http 
> https ftp news. Here the protocol tells which command and format to 
> send over TCP/IP. As DBI is more like a DBMS-wrapper than a protocol I 
> think it would be logical to people when the DBMS protocol is the 
> prefix.

Another issue to consider is that of encoding the individual parts of the 
URI, in case, for example, the password contains a ":" or "/" etc, or if 
there are differing case-sensitivity issues.  Perhaps the format of 
"delimited SQL identifiers" could provide an example to follow.

-- Darren Duncan

Reply via email to