加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgresql – Postgres连接url

发布时间:2020-12-13 16:45:13 所属栏目:百科 来源:网络整理
导读:如何形成Postgres连接网址,当主机是本地主机以外的其他计算机? 我允许Postgres接受来自外部的请求。 如果你使用Libpq绑定各自的语言,根据它的 documentation URI形成如下: postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1...]
如何形成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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读