Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: added FQDN function description #8023

Merged
merged 3 commits into from
Dec 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 33 additions & 2 deletions docs/en/query_language/functions/other_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,39 @@

Returns a string with the name of the host that this function was performed on. For distributed processing, this is the name of the remote server host, if the function is performed on a remote server.

## FQDN(), fullHostName()
Returns the Fully qualified domain name aka [FQDN](https://en.wikipedia.org/wiki/Fully_qualified_domain_name).
## FQDN {#fqdn}

Returns the fully qualified domain name.

**Syntax**

```sql
fqdn();
```

This function is case-insensitive.

**Returned value**

- String with the fully qualified domain name.

Type: `String`.

**Example**

Query:

```sql
SELECT FQDN();
```

Result:

```text
┌─FQDN()──────────────────────────┐
│ clickhouse.ru-central1.internal │
└─────────────────────────────────┘
```

## basename

Expand Down
34 changes: 34 additions & 0 deletions docs/ru/query_language/functions/other_functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@

Возвращает строку - имя хоста, на котором эта функция была выполнена. При распределённой обработке запроса, это будет имя хоста удалённого сервера, если функция выполняется на удалённом сервере.

## FQDN {#fqdn}

Возвращает полное имя домена.

**Синтаксис**

```sql
fqdn();
```

Эта функция регистронезависимая.

**Возвращаемое значение**

- Полное имя домена.

Тип: `String`.

**Пример**

Запрос:

```sql
SELECT FQDN();
```

Ответ:

```text
┌─FQDN()──────────────────────────┐
│ clickhouse.ru-central1.internal │
└─────────────────────────────────┘
```

## basename

Извлекает конечную часть строки после последнего слэша или бэкслэша. Функция часто используется для извлечения имени файла из пути.
Expand Down