Merge pull request #28103 from sevirov/sevirov-DOCSUP-13434-document_the_serveruuid_function

DOCSUP-13434: Document the serverUUID() function
This commit is contained in:
tavplubix 2021-08-28 17:17:01 +03:00 committed by GitHub
commit 7fce331475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 3 deletions

View File

@ -245,7 +245,22 @@ SELECT
└──────────────────┴──────────────────────────────────────┘
```
## serverUUID() {#server-uuid}
Returns the random and unique UUID, which is generated when the server is first started and stored forever. The result writes to the file `uuid` created in the ClickHouse server directory `/var/lib/clickhouse/`.
**Syntax**
```sql
serverUUID()
```
**Returned value**
- The UUID of the server.
Type: [UUID](../data-types/uuid.md).
## See Also {#see-also}
- [dictGetUUID](../../sql-reference/functions/ext-dict-functions.md#ext_dict_functions-other)

View File

@ -243,9 +243,23 @@ SELECT
└──────────────────┴──────────────────────────────────────┘
```
## serverUUID() {#server-uuid}
Возвращает случайный и уникальный UUID, который генерируется при первом запуске сервера и сохраняется навсегда. Результат записывается в файл `uuid`, расположенный в каталоге сервера ClickHouse `/var/lib/clickhouse/`.
**Синтаксис**
```sql
serverUUID()
```
**Возвращаемое значение**
- UUID сервера.
Тип: [UUID](../data-types/uuid.md).
## См. также: {#sm-takzhe}
- [dictGetUUID](ext-dict-functions.md)
- [dictGetUUIDOrDefault](ext-dict-functions.md)
[Original article](https://clickhouse.tech/docs/en/query_language/functions/uuid_function/) <!--hide-->