ClickHouse C: A Header-Only Client for the Native Protocol
ClickHouse C – Talk to ClickHouse using its native binary protocol
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.
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.