mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
DOCAPI-6550: Some clarifications.
This commit is contained in:
parent
78672f43e1
commit
95626b068d
@ -135,7 +135,7 @@ If you specified `decompress=1` in the URL, the server decompresses the same dat
|
||||
|
||||
It is also possible to use other compression methods for HTTP data. To send a `POST` request compressed, append the request header `Content-Encoding: compression_method`. In order for ClickHouse to compress the response, you must append `Accept-Encoding: compression_method`. You can use the following compression methods:
|
||||
|
||||
- Standard `gzip`-based [HTTP compression](https://en.wikipedia.org/wiki/HTTP_compression) (`compression_method = gzip`).
|
||||
- Common gzip-based [HTTP compression](https://en.wikipedia.org/wiki/HTTP_compression) (`compression_method = gzip`).
|
||||
|
||||
You should use the ClickHouse [enable_http_compression](../operations/settings/settings.md#settings-enable_http_compression) setting. You can configure the compression level of the data with the [http_zlib_compression_level](#settings-http_zlib_compression_level) setting.
|
||||
|
||||
|
@ -6,12 +6,14 @@ Returns a string with the name of the host that this function was performed on.
|
||||
|
||||
## basename
|
||||
|
||||
Extracts trailing part of a string after the last slash or backslash.
|
||||
Extracts trailing part of a string after the last slash or backslash. This function if often used to extract the filename from the path.
|
||||
|
||||
```
|
||||
basename( expr )
|
||||
```
|
||||
|
||||
Backslashes should be escaped in `expr`.
|
||||
|
||||
**Parameters**
|
||||
|
||||
`expr` — Expression, resulting in the [String](../../data_types/string.md)-type value.
|
||||
@ -21,7 +23,7 @@ basename( expr )
|
||||
A string-type value that contains:
|
||||
|
||||
- Trailing part of a string after the last slash or backslash in it.
|
||||
- Original string if there is no slashes or backslashes in it.
|
||||
- Original string if there are no slashes or backslashes in it.
|
||||
|
||||
**Example**
|
||||
|
||||
@ -34,6 +36,14 @@ SELECT basename(a), 'some/long/path/to/file' AS a
|
||||
└────────────────────────────────────┴────────────────────────┘
|
||||
```
|
||||
```sql
|
||||
SELECT basename(a), 'some\\long\\path\\to\\file' AS a
|
||||
```
|
||||
```text
|
||||
┌─basename('some\\long\\path\\to\\file')─┬─a──────────────────────┐
|
||||
│ file │ some\long\path\to\file │
|
||||
└────────────────────────────────────────┴────────────────────────┘
|
||||
```
|
||||
```sql
|
||||
SELECT basename(a), 'some-file-name' AS a
|
||||
```
|
||||
```text
|
||||
|
Loading…
Reference in New Issue
Block a user