File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,11 +74,11 @@ let conn = try!(Connection::connect("postgres://user:pass@host:port/database?arg
7474defaults to the value of ` user ` if not specified. The driver supports ` trust ` ,
7575` password ` , and ` md5 ` authentication.
7676
77- Unix domain sockets can be used as well by activating the ` unix_socket ` feature.
78- The ` host ` portion of the URI should be set to the absolute path to the
79- directory containing the socket file. Since ` / ` is a reserved character in
80- URLs, the path should be URL encoded. If Postgres stored its socket files in
81- ` /run/postgres ` , the connection would then look like:
77+ Unix domain sockets can be used as well by activating the ` unix_socket ` or
78+ ` nightly ` features. The ` host ` portion of the URI should be set to the absolute
79+ path to the directory containing the socket file. Since ` / ` is a reserved
80+ character in URLs, the path should be URL encoded. If Postgres stored its socket
81+ files in ` /run/postgres ` , the connection would then look like:
8282``` rust
8383let conn = try ! (Connection :: connect (" postgres://postgres@%2Frun%2Fpostgres" , SslMode :: None ));
8484```
Original file line number Diff line number Diff line change @@ -1020,13 +1020,13 @@ impl Connection {
10201020 /// (5432) is used if none is specified. The database name defaults to the
10211021 /// username if not specified.
10221022 ///
1023- /// Connection via Unix sockets is supported with the `unix_socket`
1024- /// feature . To connect to the server via Unix sockets, `host` should be
1025- /// set to the absolute path of the directory containing the socket file.
1026- /// Since `/` is a reserved character in URLs, the path should be URL
1027- /// encoded. If the path contains non-UTF 8 characters, a `ConnectParams`
1028- /// struct should be created manually and passed in. Note that Postgres
1029- /// does not support SSL over Unix sockets.
1023+ /// Connection via Unix sockets is supported with either the `unix_socket`
1024+ /// or `nightly` features . To connect to the server via Unix sockets, `host`
1025+ /// should be set to the absolute path of the directory containing the
1026+ /// socket file. Since `/` is a reserved character in URLs, the path should
1027+ /// be URL encoded. If the path contains non-UTF 8 characters, a
1028+ /// `ConnectParams` struct should be created manually and passed in. Note
1029+ /// that Postgres does not support SSL over Unix sockets.
10301030 ///
10311031 /// # Examples
10321032 ///
You can’t perform that action at this time.
0 commit comments