title: Dynamically choosing database/tables in pg-promise API
body: <p>pg-promise API recommends an initial connection object like:</p>
  <pre><code>var pgp = require('pg-promise')();
  const mysqlcon = `postgres://${process.env.DB_USER}:${process.env.DB_PASSWORD}@${process.env.DB_HOST}:5432/my_database}` //note that 'my_database' is hardcoded here
  var db = pgp(mysqlcon);
  module.exports = db;
  </code></pre>
  <p>then I use this object to query <em>table_customers</em> in <em>my_database</em> database:</p>
  <pre><code>var db = require('./models/postgres')
  db.many('SELECT * from table_customers')
    .then(function (data) {
      console.log('DATA:', data)
    })
    .catch(function (error) {
      console.log('ERROR:', error)
  })
  </code></pre>
  <p>This works perfectly fine, but if I were to select another table from another database, how could I dynamically modify the connection object to change <strong>my_database</strong> to <strong>another_database</strong>?</p>