v.20.12New Feature
New tcpPort Function for Retrieving Server TCP Port
New tcpPort function returns TCP port listened by this server. #17134 (Ivan).Why it matters
This feature allows users to programmatically retrieve the TCP port of the running ClickHouse server, which is useful for diagnostics, monitoring, and dynamic configuration scenarios where the server's listening port is needed.How to use it
Use the newtcpPort() function in your SQL queries to obtain the TCP port. For example:SELECT tcpPort()