← Monday, October 12, 2026DatabasesTool

ClickHouse C adds a header-only client for the Native protocol

github.com 4 min read Editor score 6/10

The C client decodes ClickHouse Native Format blocks and can read `clickhouse-local` output from a pipe without TCP or compression. Its PostgreSQL-extension-oriented design may interest engineers integrating ClickHouse with other systems.

What
clickhouse-c is a header-only C client for ClickHouse's Native wire protocol, with a core block decoder and optional client headers.
How
With clickhouse local, output can flow through a pipe and POSIX I/O into chc_in; chc_block_read decodes buffered Native blocks.
Why it matters
The decoder can consume Native data without TCP or link-time dependencies beyond libc, useful for embedding in systems code.
stdout bytes I/O buffered data clickhouse local pipe chc_posix_io chc_in chc_block_read
The example streams Native output from clickhouse local into the block decoder. Sketched from the article's own text.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.