# ClickHouse C: A Header-Only Client for the Native Protocol

Original title: ClickHouse C – Talk to ClickHouse using its native binary protocol

> Hacker News story 50049003 · language: en · submitted 2026-10-11
> Web version: https://zeli.app/story/50049003
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 48 · by [saisrirampur](<https://news.ycombinator.com/user?id=saisrirampur>) · 💬 3
[original](<https://github.com/ClickHouse/clickhouse-c>) · [HN discussion](<https://news.ycombinator.com/item?id=50049003>)

## Summary

ClickHouse C is a minimalist, header-only C library for talking to ClickHouse over its native binary protocol. It's designed for embedding in PostgreSQL extensions but has no PG-specific code. The core header decodes Native blocks from any chc_io source, while optional headers add TCP, compression, and OpenSSL. It supports ClickHouse 23.3+ and avoids HTTP, DNS, threading, and async I/O by design.

## Key quote

> Including clickhouse.h alone gives a pure block decoder over caller-supplied chc_io, usable for reading clickhouse-local's FORMAT Native from a pipe with no TCP, no compression, no link-time deps beyond libc.

---

## Cite

- Page: https://zeli.app/story/50049003
- Date: 2026-10-11
- Source: github.com (https://github.com/ClickHouse/clickhouse-c)
- Hacker News: https://news.ycombinator.com/item?id=50049003

## Other languages

- zh: https://zeli.app/zh/story/50049003 · markdown: https://zeli.app/zh/story/50049003.md
- ja: https://zeli.app/ja/story/50049003 · markdown: https://zeli.app/ja/story/50049003.md
- ko: https://zeli.app/ko/story/50049003 · markdown: https://zeli.app/ko/story/50049003.md
- de: https://zeli.app/de/story/50049003 · markdown: https://zeli.app/de/story/50049003.md
- es: https://zeli.app/es/story/50049003 · markdown: https://zeli.app/es/story/50049003.md
- ru: https://zeli.app/ru/story/50049003 · markdown: https://zeli.app/ru/story/50049003.md
