当主机是除localhost之外的其他计算机时,Postgresql连接URL是如何形成的?
我允许Postgresql接受来自外部的请求.
@H_301_3@@H_301_3@
如果对各自的语言使用Libpq绑定,则根据其
documentation URI形成如下:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
以下是同一文档中的示例
postgresql:// postgresql://localhost postgresql://localhost:5432 postgresql://localhost/mydb postgresql://user@localhost postgresql://user:secret@localhost postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp postgresql://localhost/mydb?user=other&password=secret@H_301_3@