【问题标题】:Read clickhouse configured port numbers from inside从内部读取 clickhouse 配置的端口号
【发布时间】:2022-11-25 15:41:18
【问题描述】:

是否有可能读取 clickhouse 的端口? TCP端口信息可以从system.clusters表中读取,但我需要弄清楚http端口

【问题讨论】:

    标签: clickhouse


    【解决方案1】:

    使用getServerPort函数:

    SELECT getServerPort('http_port')
    
    /*
    ┌─getServerPort('http_port')─┐
    │                       8123 │
    └────────────────────────────┘
    */
    

    考虑到此功能从版本21.10 开始可用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-01-02
      • 2016-10-29
      • 1970-01-01
      相关资源
      最近更新 更多