Update docs for unix socket change

This commit is contained in:
Steven Fackler 2015-02-27 20:04:08 -08:00
parent dac4c4f4f1
commit 52540678c8

View File

@ -76,9 +76,10 @@ 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. 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.
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.
```rust
let conn = try!(Connection::connect("postgres://postgres@%2Frun%2Fpostgres", &SslMode::None));
```