pg_clickhouse, the PostgreSQL extension for querying ClickHouse databases, has received several notable updates. Version 0.1.10 added JSONB accessor operator and function pushdown (including ->, ->>, jsonb_extract_path, jsonb_extract_path_text) that translates to ClickHouse sub-column syntax. Version 0.2.0 improved pushdown for SQL date/time value functions like CURRENT_DATE, CURRENT_TIMESTAMP, clock_timestamp(), and others, ensuring timezone-aware translation to ClickHouse equivalents. Array function pushdown was also added, mapping Postgres functions like array_cat, array_to_string, and string_to_array to their ClickHouse counterparts. Additionally, HTTP result set streaming was introduced, buffering ~50MB at a time instead of loading entire result sets into memory — reducing peak memory usage from 600MB+ to under 86MB when querying large datasets like NYC taxi data.
Table of contents
Setup #JSONB accessors #SQL value functions #Array functions #HTTP result set streaming #What's next #Footnotes #1 Comment
Sort: