PostgreSQL Connection URIs
摘自官方文档:
https://www.postgresql.org/docs/9.2/static/libpq-connect.html
The general form for a connection URI is:
postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
The URI scheme designator can be either postgresql:// or postgres://. Each of the URI parts is optional. The following examples illustrate valid URI syntax uses:
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
Components of the hierarchical part of the URI can also be given as parameters. For example:
postgresql:///mydb?host=localhost&port=5433