title: Multiple PostgreSQL database (same server) access in Slick 2
body: <p>So I have a Scala/Play application that uses multiple MySQL and PostgreSQL databases (on the same server), however I have a problem with PostgreSQL.</p>
  
  <p>This is the configuration:</p>
  
  <pre><code>db.postgres.driver=org.postgresql.Driver
  db.postgres.url="jdbc:postgresql://localhost:5432/"
  db.postgres.user=root
  db.postgres.password=root
  
  db.mysql.driver="com.mysql.jdbc.Driver"
  db.mysql.url="jdbc:mysql://localhost"
  db.mysql.user=root
  db.mysql.pass=root
  </code></pre>
  
  <p>This simple method works fine with MySQL:</p>
  
  <pre><code>def test = DB("mysql").withDynSession {
      val rez = sql"""select * from dbName.test""".as[TestRow].list
      println(rez)
  }
  </code></pre>
  
  <p>But exactly the same method with Postgres</p>
  
  <pre><code>def test = DB("postgres").withDynSession {
      val rez = sql"""select * from dbName.test""".as[TestRow].list
      println(rez)
  }
  </code></pre>
  
  <p>throws an error:</p>
  
  <pre><code>org.postgresql.util.PSQLException: ERROR: relation "dbName.test" does not exist
  </code></pre>
  
  <p>How come these methods are identical, but MySQL example works and PostgreSQL doesn't?</p>
  
  <p>My stack:</p>
  
  <ul>
  <li>Scala 2.10.3</li>
  <li>Play 2.2.2</li>
  <li>Slick 2.0</li>
  <li>PostgreSQL 9.3.3</li>
  <li>MySQL 5.6.16</li>
  <li>Java 8</li>
  </ul>
  
  <p>Postgresql JDBC driver version is 9.3-1101-jdbc41</p>