Fix docs
This commit is contained in:
parent
b0bed6ab4c
commit
9a595c9d3c
10
README.md
10
README.md
@ -74,11 +74,11 @@ let conn = try!(Connection::connect("postgres://user:pass@host:port/database?arg
|
||||
defaults to the value of `user` if not specified. The driver supports `trust`,
|
||||
`password`, and `md5` authentication.
|
||||
|
||||
Unix domain sockets can be used as well by activating the `unix_socket` feature.
|
||||
The `host` portion of the URI should be set to the absolute path to the
|
||||
directory containing the socket file. Since `/` is a reserved character in
|
||||
URLs, the path should be URL encoded. If Postgres stored its socket files in
|
||||
`/run/postgres`, the connection would then look like:
|
||||
Unix domain sockets can be used as well by activating the `unix_socket` or
|
||||
`nightly` features. The `host` portion of the URI should be set to the absolute
|
||||
path to the directory containing the socket file. Since `/` is a reserved
|
||||
character in URLs, the path should be URL encoded. If Postgres stored its socket
|
||||
files in `/run/postgres`, the connection would then look like:
|
||||
```rust
|
||||
let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", SslMode::None));
|
||||
```
|
||||
|
14
src/lib.rs
14
src/lib.rs
@ -1020,13 +1020,13 @@ impl Connection {
|
||||
/// (5432) is used if none is specified. The database name defaults to the
|
||||
/// username if not specified.
|
||||
///
|
||||
/// Connection via Unix sockets is supported with the `unix_socket`
|
||||
/// feature. To connect to the server via Unix sockets, `host` should be
|
||||
/// set to the absolute path of the directory containing the socket file.
|
||||
/// Since `/` is a reserved character in URLs, the path should be URL
|
||||
/// encoded. If the path contains non-UTF 8 characters, a `ConnectParams`
|
||||
/// struct should be created manually and passed in. Note that Postgres
|
||||
/// does not support SSL over Unix sockets.
|
||||
/// Connection via Unix sockets is supported with either the `unix_socket`
|
||||
/// or `nightly` features. To connect to the server via Unix sockets, `host`
|
||||
/// should be set to the absolute path of the directory containing the
|
||||
/// socket file. Since `/` is a reserved character in URLs, the path should
|
||||
/// be URL encoded. If the path contains non-UTF 8 characters, a
|
||||
/// `ConnectParams` struct should be created manually and passed in. Note
|
||||
/// that Postgres does not support SSL over Unix sockets.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user