PSQL 指定连接参数

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

PSQL 用 标准语法 指定连接参数

https://www.postgresql.org/docs/10/app-psql.html

例如:

`./psql -h hostname -p port -d dbname -U username `

PSQL 用 URI 指定连接参数

https://www.postgresql.org/docs/10/libpq-connect.html#LIBPQ-CONNSTRING

33.1.1.2. Connection URIs The general form for a connection URI is:

`postgresql://[user[:password]@][netloc][:port][,...][/dbname][?param1=value1&...]`

例如:

`postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp`

psql使用例如:

`./psql postgresql://user:pwd@localhost:port/db?sslmode=prefer`

转载于:https://my.oschina.net/liuyuanyuangogo/blog/3005097

你可能感兴趣的:(PSQL 指定连接参数)