如何在doobie数据库中设置端口号url?

How to set port number in doobie database url?

我的 Postgresql 服务器 运行 在端口 6000(不是默认端口 5432)上。 如何设置将此端口号放入 doobie jdbc url?

val xa = Transactor.fromDriverManager[IO](
  "org.postgresql.Driver",     // driver classname
  "jdbc:postgresql:databasename",     // connect URL (driver-specific)
  "user",                  // user
  "password"                           // password

这是错误信息:

[info] - should success *** FAILED ***
[info]   org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

端口是连接的一部分url:

val xa = Transactor.fromDriverManager[IO](
  "org.postgresql.Driver",     // driver classname
  "jdbc:postgresql://localhost:5432/world",     // connect URL (driver-specific)
  "user",                  // user
  "password"                           // password