Changelog
All notable changes to this project will be documented in this file. It uses the Keep a Changelog format, and this project adheres to Semantic Versioning.
v0.1.2 β 2026-01-07
This release makes binary-only changes. Once installed, any existing use of
pg_clickhouse v0.1 will get its benefits on reload without needing to
ALTER EXTENSION UPDATE.
β‘ Improvements
- Added support for parameterized execution, including
PREPAREandEXECUTE, by converting PostgreSQL$1-style parameters to ClickHouse{param:type}-style parameters. - Added support for inserting arrays to the http engine.
π Documentation
- Documented
IMPORT FOREIGN SCHEMAidentifier case preservation behavior. - Fixed the Postgres Docker start and connect info in the tutorial.
- Added complete DML documentation to the reference
docs, including the new
PREPARE/EXECUTEsupport andINSERT,SET,COPY, as well as shared library preloading.
πͺ² Bug Fixes
- Fixed the http engineβs parsing of UUID arrays selected from ClickHouse.
- Fixed the binary engineβs conversion of Date values, which in arrays ended
up too large by several orders of magnitude (e.g.,
2025-12-05would be converted to10529827-09-17π±). Thanks to Tom Lane for the pointer to the proper function to easily convert epoch seconds to a date. - Fixed a binary engine bug where dates and timestamps for epoch 0
(
1970-01-01 00:00:00) rendered asNULL. - Added support for the
Date32ClickHouse type. - Fixed conversion of
array_agg()to support ClickHouse versions prior to 23.8. - Fixed the precision of fractional seconds in the binary engineβs
conversion of ClickHouse
DateTime64values to PostgresTIMESTAMP(#114).
π Notes
- Removed unused code designed to support custom PostgreSQL extensions: ajbool, ajtime, country, and istore.
- Tweaked cost estimation to encourage pushdown of
min()andmax().
π Documentation
- Added a note to the
IMPORT FOREIGN SCHEMAdocumentation explaining how table and column names imported from ClickHouse will have their letter casing and blank spaces preserved if they have uppercase characters or blank spaces. - Fixed the commands to start and connect to the pg_clickhouse Docker image in the tutorial.
- Documented the Postgres aggregate functions known (via new tests) to push down to ClickHouse.
v0.1.1 β 2025-12-17
This release makes binary-only changes. Once installed, any existing use of
pg_clickhouse v0.1 will get its benefits on reload without needing to
ALTER EXTENSION UPDATE.
β‘ Improvements
- Refactored the internal handling of the
pg_clickhouse.session_settingsGUC to parse the settings only once rather than for every query sent to ClickHouse
πͺ² Bug Fixes
- Fixed a crash when sending an empty
COPY FROMvia the binary driver
β¬οΈ Dependency Updates
- Updated vendored clickhouse-cpp library
ποΈ Build Setup
- Fixed the
Makefiletargets so that callingmake installwithout first callingmakewill properly create the versioned SQL file.
π Documentation
- Added a versioning policy the documentation
- Fixed the badges and broken TPC-H links in README.md
- Added PGXN installation instructions to README.md
v0.1.0 β 2025-12-09
β‘ Improvements
- Improved function and aggregate pushdown
- Added TLS support to both the http and binary engines
- Added pushdown aggregate functions:
uniq()uniqExact()uniqCombined()uniqCombined64()uniqExact()uniqHLL12()uniqTheta()
- Added pushdown functions:
toUInt8()toUInt16()toUInt32()toUInt64()toUInt128()quantile()quantileExact()
- Mapped PostgreSQL
regexp_like()to push down to ClickHousematch()function - Mapped PostgreSQL
extract()to push down to equivalent ClickHouse DateTime extraction functions (already mapped todate_part()) - Mapped PostgreSQL
percentile_cont()ordered set aggregate function to push down to ClickHousequantile()parametrized - Mapped the
COUNT()return value tobigint - Added the query text and, for the http engine, the status code to error messages
- Added
pg_clickhouse.session_settingsGUC, defaulting tojoin_use_nulls 1, group_by_use_nulls 1, final 1 - Added mappings and support for additional data types:
Bool=>booleanDecimal=>numericJSON=>jsonb(http engine only)
- Added the
dbnameoption to http engine connections, includingclickhouse_raw_query() - Added LEFT SEMI JOIN pushdown for
EXISTS()subqueries
ποΈ Build Setup
- Ported from clickhouse_fdw
- Made lots of general code cleanup
- Added PGXS build pipeline
- Added PGXN and GitHub release workflows
- Added
pg_clickhouseOCI image workflow that publishes to ghcr.io/clickhouse/pg_clickhouse, with tags for PostgreSQL versions 13-18
π Documentation
- Added tutorial in doc/tutorial.md
- Added reference documentation in doc/pg_clickhouse.md
πͺ² Bug Fixes
- Fixed
dictGet(),argMin(), andargMax() - Fixed bug in filtered
COUNT() - Fixed
AggregateFunctionoption to propagate to a nested aggregate function call - Improved unsigned integer support
β¬οΈ Dependency Updates
- Updated vendored clickhouse-cpp library
- Reimplemented binary engine inserts with clickhouse-cpp improvements
- Support and tested against PostgreSQL 13-18
- Support and tested against ClickHouse 23-25
π Notes
- Set full version in
PG_MODULE_MAGIC_EXT - Set to default ports to TLS for ClickHouse Cloud host names