I have a problem that I'm not quite sure how to solve: I have a web application (packaged as a war) and clients can configure which database they wish to point to. We support both PostgreSQL and Redshift (as well as others). JDBC4 drivers are loaded automatically, which is good. Here's the problem:
It appears that the Redshift JDBC driver will respond to the jdbc://postgresql connection string before the PostgreSQL one can. This causes JDBC errors when connecting to a PostgreSQL database.
I am specifying the driver name 'org.postgresql.Driver' as the driver for the datasource in my pom.xml, but i'm not sure how the spring JDBC templates are choosing the driver (unless it picks up the first handler).
Anyone else run into this sort of issue?