Closed jlbooker closed 10 years ago
@jlbooker: I like the way you implemented the PDO driver switch. Much more elegant and extensible than my SQLite file existence test hack. :+1:
@ctrueden Thanks! Your solution was fine when there are only two options, but I saw the if/elseif/else structure quickly getting out of hand for 3+ driver options.
I did keep the SQLite file existence check, though, since it's a nice sanity check. If we can give a more useful error message and help out the user, then we should. :+1:
Postgresql is also a popular Trac backend. Connecting to a Postgresql database is easy with PDO, but there are several SQL syntax incompatibilities.
Update connection info to support connecting to Postgres and correct SQL syntax for compatibility.