   uri = "postgres://#{config.user}:#{config.password}@#{config.host}:#{config.port}/#{config.database}"
   console.log "Connecting to URI '#{uri}'"
 
-  pgConnect uri
+  pgConnect uri, config
   .then (context) ->
     context.watch = durations.stopwatch().start()
     console.log "Ready to query PostgreSQL."

  deferred.promise

# Connect to the database at the specified URI 
pgConnect = (uri) ->
  deferred = Q.defer()
  console.log "connecting to PostgreSQL..."
  connectWatch = durations.stopwatch().start()

    database: config.database
  console.log "Connecting to database:\n'#{JSON.stringify(myCfg)}'"

  mysqlConnect myCfg, config
  .then (context) ->
    context.watch = durations.stopwatch().start()
    console.log "Ready to query MySQL."
