register dbtype pgsql from com.impossibl.postgres.jdbc.PGDriver

Description

If you call (jdbc/with-db-connection [db {:dbtype "pgsql" :host "localhost" ort 5432 :dbname "tabwin_dev" :user "postgres" assword "xxx"}]) it leads to a NPE

[[java.lang.Class forName0 "Class.java" -2]
[java.lang.Class forName "Class.java" 348]
[clojure.lang.RT classForName "RT.java" 2183]
[clojure.lang.RT classForNameNonLoading "RT.java" 2196]
[clojure.lang.RT loadClassForName "RT.java" 2202]
[clojure.java.jdbc$get_connection invokeStatic "jdbc.clj" 290]
[clojure.java.jdbc$get_connection invoke "jdbc.clj" 193]

It would be nice : if pgsql was registered and in case of a misspelled dbtype a more friendlier user message instead of NPE.

Environment

None

Activity

Show:

import March 3, 2017 at 12:04 AM

Comment made by: geraldodev

Thank You Mr. Corfield.

Sean Corfield March 1, 2017 at 6:55 PM

0.7.0-alpha2 includes this fix.

Sean Corfield March 1, 2017 at 6:47 PM

Add pgsql and tested against the Impossibl driver. Noted that maxRows does not seem to be obeyed in queries (two test failed) so those are conditionally excluded.

Also improved the error message when an unknown / misspelled dbtype or subprotocol is supplied.

Note: in timing tests the Impossibl driver was much slower on my machine than the regular PostgreSQL driver!

Completed

Details

Assignee

Reporter

Priority

Created March 1, 2017 at 2:14 PM
Updated March 3, 2017 at 12:04 AM
Resolved March 3, 2017 at 12:04 AM