Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit20f19f3

Browse files
committed
docs([tokio-]postgres/config): fix examples for unix socket paths
The commonly used location for sockets is `/run/{service}`, with`/var/lib/{service}` containing the actual data from the service.
1 parent490c485 commit20f19f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎postgres/src/config.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use tokio_postgres::{Error, Socket};
9292
/// ```
9393
///
9494
/// ```not_rust
95-
/// host=/var/lib/postgresql,localhost port=1234 user=postgres password='password with spaces'
95+
/// host=/var/run/postgresql,localhost port=1234 user=postgres password='password with spaces'
9696
/// ```
9797
///
9898
/// ```not_rust
@@ -117,15 +117,15 @@ use tokio_postgres::{Error, Socket};
117117
/// ```
118118
///
119119
/// ```not_rust
120-
/// postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10
120+
/// postgresql://user:password@%2Fvar%2Frun%2Fpostgresql/mydb?connect_timeout=10
121121
/// ```
122122
///
123123
/// ```not_rust
124124
/// postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write
125125
/// ```
126126
///
127127
/// ```not_rust
128-
/// postgresql:///mydb?user=user&host=/var/lib/postgresql
128+
/// postgresql:///mydb?user=user&host=/var/run/postgresql
129129
/// ```
130130
#[derive(Clone)]
131131
pubstructConfig{

‎tokio-postgres/src/config.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ pub enum Host {
178178
/// ```
179179
///
180180
/// ```not_rust
181-
/// host=/var/lib/postgresql,localhost port=1234 user=postgres password='password with spaces'
181+
/// host=/var/run/postgresql,localhost port=1234 user=postgres password='password with spaces'
182182
/// ```
183183
///
184184
/// ```not_rust
@@ -203,15 +203,15 @@ pub enum Host {
203203
/// ```
204204
///
205205
/// ```not_rust
206-
/// postgresql://user:password@%2Fvar%2Flib%2Fpostgresql/mydb?connect_timeout=10
206+
/// postgresql://user:password@%2Fvar%2Frun%2Fpostgresql/mydb?connect_timeout=10
207207
/// ```
208208
///
209209
/// ```not_rust
210210
/// postgresql://user@host1:1234,host2,host3:5678?target_session_attrs=read-write
211211
/// ```
212212
///
213213
/// ```not_rust
214-
/// postgresql:///mydb?user=user&host=/var/lib/postgresql
214+
/// postgresql:///mydb?user=user&host=/var/run/postgresql
215215
/// ```
216216
#[derive(Clone,PartialEq,Eq)]
217217
pubstructConfig{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp