Bit of a news catchup on the pg_clickhouse project.
What’s New
First up, a couple weeks ago the ClickHouse Blog published What’s New in pg_clickhouse, in which I covered various improvements to the extension:
We’ve been gratified by the community reception of pg_clickhouse, the extension to query ClickHouse databases from Postgres. Recent uptake generated a ton of feedback, which we’ve been diligently addressing in the last few releases. These changes follow our constant mantra for pg_clickhouse: pushdown, pushdown, pushdown! Let’s take a quick tour.
It includes working pushdown examples for JSONB accessors, SQL value functions like CURRENT_TIMESTAMP, array functions like array_cat() and array_to_string(). It wraps with a demonstration of HTTP result set streaming, with a nice bar char for the before and after (spoiler: pg_clickhouse’s http driver became far more memory-efficient).
v0.3.0
But that’s not all. Today we released pg_clickhouse 0.3.0. Nothing drives improvements like customer issues, and v0.3.0 features a slew of them, including:
-
Mapping for the ClickHouse JSON type to the PostgreSQL JSONB type in the binary driver; it was already supported for the HTTP driver.
-
Support for mapping the Postgres JSON type to the ClickHouse JSON type. In general JSONB better matches ClickHouse JSON semantics, but we wanted to support the obvious alternative.
-
Pushdown for the Postgres
to_char(timestamp[tz], fmt)function to the ClickHouseformatDateTime()function for formats that map to binary-compatible equivalents:YYYY,MM,DD,DDD,HH24,HH12,HH,MI,SS,Q,Mon,Dy,AM/PM, plus lowercase variants. -
Support for pushing down functions from the new re2 extension, which provides ClickHouse-compatible RE2-backed regular expression functio