2 releases
0.1.1 | Oct 11, 2024 |
---|---|
0.1.0 | Oct 11, 2024 |
#900 in Database interfaces
284 downloads per month
Used in hashpoo
69KB
2K
SLoC
pg-connection-string
parses URIs in the ways that psql (and generally,
libpq) will accept them. This is a more convenient and robust alternative to
crates like uri
.
As outlined in the Postgres docs, the general form for a connection URI is:
postgresql://[userspec@][hostspec][/dbname][?paramspec]
where userspec is:
user[:password]
and hostspec is:
[host][:port][,...]
and paramspec is:
name=value[&...]
The URI scheme designator can be either postgresql://
or postgres://
.
Each of the remaining URI parts is optional.
Dependencies
~1.2–8.5MB
~69K SLoC