Conversation
Add the `EXTRACT` OIDs to the list of OIDs mapped to `CF_DATE_PART`, which `deparse.c` converts to ClickHouse equivalents. This allows `EXTRACT()` to function just like `date_part()`. Also add the OIDs for extracting values from dates; it previously worked with `date_part()` for some reason, but did not for `EXTRACT()`. So include them both for completeness. Add tests for these patterns. Closes #24.
serprex
approved these changes
Nov 3, 2025
theory
added a commit
to theory/HouseClick
that referenced
this pull request
Nov 4, 2025
Currently dupes the regular Postgres queries but replaces the `uk_price_paid` table with `uk_price_paid_synthetic`. Left some comments for where it should be able to use aggregate tables, but they're not currently accessible to the `demo` user in `sql-clickhouse.clickhouse.com` so not available to the FDW, either. Update the `SelectArea()` function to enable the medium/large buttons for both FDW and CLickHouse, and update `getQuery()` to fetch the large FDW queries when wanted. While at it, remove some trailing spaces from files and restore the `EXTRACT()` function to the Postgres queries, since it was fixed by ClickHouse/pg_clickhouse#31.
theory
added a commit
to theory/HouseClick
that referenced
this pull request
Nov 4, 2025
Currently dupes the regular Postgres queries but replaces the `uk_price_paid` table with `uk_price_paid_synthetic`. Left some comments for where it should be able to use aggregate tables, but they're not currently accessible to the `demo` user in `sql-clickhouse.clickhouse.com` so not available to the FDW, either. Update the `SelectArea()` function to enable the medium/large buttons for both FDW and CLickHouse, and update `getQuery()` to fetch the large FDW queries when wanted. While at it, remove some trailing spaces from files and restore the `EXTRACT()` function to the Postgres queries, since it was fixed by ClickHouse/pg_clickhouse#31.
theory
added a commit
to theory/HouseClick
that referenced
this pull request
Nov 14, 2025
Currently dupes the regular Postgres queries but replaces the some of the table names to use the ClickHouse materialized views. Update the `SelectArea()` function to enable the medium/large buttons for both FDW and CLickHouse, and update `getQuery()` to fetch the large FDW queries when wanted. Add DDL to `schemas/postgres.sql` to create the `clickhouse_fdw` extension and import the tables from the demo database so that they're accessible to HouseClick. This won't work without `clickhouse_fdw`, so add a placeholder to `README.md` for forthcoming installation instructions. While at it, remove some trailing spaces from files and restore the `EXTRACT()` function to the Postgres queries, since it was fixed by ClickHouse/pg_clickhouse#31.
theory
added a commit
to theory/HouseClick
that referenced
this pull request
Nov 14, 2025
Currently dupes the regular Postgres queries but replaces the some of the table names to use the ClickHouse materialized views. Update the `SelectArea()` function to enable the medium/large buttons for both FDW and CLickHouse, and update `getQuery()` to fetch the large FDW queries when wanted. Add DDL to `schemas/postgres.sql` to create the `clickhouse_fdw` extension and import the tables from the demo database so that they're accessible to HouseClick. This won't work without `clickhouse_fdw`, so add a placeholder to `README.md` for forthcoming installation instructions. While at it, expand and reorder the configs in `.env.example` and` remove some trailing spaces from files and restore the `EXTRACT()` function to the Postgres queries, since it was fixed by ClickHouse/pg_clickhouse#31.
theory
added a commit
to theory/HouseClick
that referenced
this pull request
Nov 18, 2025
Currently dupes the regular Postgres queries but replaces the some of the table names to use the ClickHouse materialized views. Update the `SelectArea()` function to enable the medium/large buttons for both FDW and CLickHouse, and update `getQuery()` to fetch the large FDW queries when wanted. Add DDL to `schemas/postgres.sql` to create the `clickhouse_fdw` extension and import the tables from the demo database so that they're accessible to HouseClick. This won't work without `clickhouse_fdw`, so add a placeholder to `README.md` for forthcoming installation instructions. Update `README.md` to suggest running the pg_clickhouse Docker image, and move the configuration description just prior to creating the Postgres tables, since the import script can use the variables there. While at it, expand and reorder the configs in `.env.example` and` remove some trailing spaces from files and restore the `EXTRACT()` function to the Postgres queries, since it was fixed by ClickHouse/pg_clickhouse#31.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the
EXTRACTOIDs to the list of OIDs mapped toCF_DATE_PART, whichdeparse.cconverts to ClickHouse equivalents. This allowsEXTRACT()to function just likedate_part().Also add the OIDs for extracting values from dates; it previously worked with
date_part()for some reason, but did not forEXTRACT(). So include them both for completeness.Add tests for these patterns. Closes #24.
While at it,
date_part()results to numbers in tests. Thedate_part()function returns double precision values, so compare to numeric values rather than strings.