Skip to content

Commit

Permalink
doc: improve escape description (#4074)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Oct 9, 2023
1 parent 558ed6a commit d5d1e29
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion docs/en/reference/how_to_set_up_metadata_engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ juicefs format \
1. JuiceFS uses public [schema](https://www.postgresql.org/docs/current/ddl-schemas.html) by default, if you want to use a `non-public schema`, you need to specify `search_path` in the connection string parameter. e.g `postgres://user:[email protected]:5432/juicefs?search_path=pguser1`
2. If the `public schema` is not the first hit in the `search_path` configured on the PostgreSQL server, the `search_path` parameter must be explicitly set in the connection string.
3. The `search_path` connection parameter can be set to multiple schemas natively, but currently JuiceFS only supports setting one. `postgres://user:[email protected]:5432/juicefs?search_path=pguser1,public` will be considered illegal.
4. Special characters in the password need to be replaced by url encoding. For example, `|` needs to be replaced with `%7C`.

:::

### Mount a file system
Expand Down Expand Up @@ -255,7 +257,10 @@ mysql://<username>[:<password>]@unix(<socket-file-path>)/<database-name>
</Tabs>

:::note
Don't leave out the `()` brackets on either side of the URL.

1. Don't leave out the `()` brackets on either side of the URL.
2. Special characters in passwords do not require url encoding

:::

For example:
Expand Down
7 changes: 6 additions & 1 deletion docs/zh_cn/reference/how_to_set_up_metadata_engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ juicefs format \
1. JuiceFS 默认使用的 public [schema](https://www.postgresql.org/docs/current/ddl-schemas.html) ,如果要使用非 `public schema`,需要在连接字符串中指定 `search_path` 参数,例如 `postgres://user:[email protected]:5432/juicefs?search_path=pguser1`
2. 如果 `public schema` 并非是 PostgreSQL 服务端配置的 `search_path` 中第一个命中的,则必须在连接字符串中明确设置 `search_path` 参数
3. `search_path` 连接参数原生可以设置为多个 schema,但是目前 JuiceFS 仅支持设置一个。`postgres://user:[email protected]:5432/juicefs?search_path=pguser1,public` 将被认为不合法
4. 密码中的特殊字符需要进行 url 编码,例如 `|` 需要编码为`%7C`

:::

### 挂载文件系统
Expand Down Expand Up @@ -255,7 +257,10 @@ mysql://<username>[:<password>]@unix(<socket-file-path>)/<database-name>
</Tabs>

:::note 注意
不要漏掉 URL 两边的 `()` 括号

1. 不要漏掉 URL 两边的 `()` 括号
2. 密码中的特殊字符不需要进行 url 编码

:::

例如:
Expand Down

0 comments on commit d5d1e29

Please sign in to comment.