postgresql – Postgres连接url

如何形成Postgres连接网址,当主机是本地主机以外的其他计算机?

我允许Postgres接受来自外部的请求。

如果你使用Libpq绑定各自的语言,根据它的 documentation URI形成如下:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]

这里是同一文档的示例

postgresql://
postgresql://localhost
postgresql://localhost:5433
postgresql://localhost/mydb
postgresql://user@localhost
postgresql://user:secret@localhost
postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...