Document tcpPort function

Задокументировал функцию tcp_port.
This commit is contained in:
Dmitriy 2020-12-21 23:13:26 +03:00
parent 245159ef33
commit 302e8f697d

View File

@ -1677,4 +1677,44 @@ Result:
UNSUPPORTED_METHOD
```
## tcpPort {#tcpPort}
Returns TCP port number listened by this server.
**Syntax**
``` sql
tcpPort()
```
**Parameters**
- None.
**Returned value**
- The TCP port number.
Type: [UInt16](../../sql-reference/data-types/int-uint.md).
**Example**
Query:
``` sql
SELECT tcpPort();
```
Result:
``` text
┌─tcpPort()─┐
│ 9000 │
└───────────┘
```
**See Also**
- [tcp_port](../../operations/server-configuration-parameters/settings.md#server_configuration_parameters-tcp_port)
[Original article](https://clickhouse.tech/docs/en/query_language/functions/other_functions/) <!--hide-->