Skip to content

Fix PostGIS formatting and map 2-D shapes to ClickHouse geo types - #309

Open
serprex wants to merge 1 commit into
mainfrom
fix-geo
Open

serprex wants to merge 1 commit into
mainfrom
fix-geo

Conversation

@serprex

@serprex serprex commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

PostGIS values could arrive as WKT or hex depending on load path and shape. Replace custom point formatting with PostGIS ST_AsText for String targets so COPY loads and WAL replay produce consistent WKT.

PostgreSQL geometry/geography subtype ClickHouse type
2-D Point Point
2-D LineString LineString
2-D Polygon Polygon
2-D MultiLineString MultiLineString
2-D MultiPolygon MultiPolygon
Other subtypes, Z/M, unconstrained columns String (WKT)

PostGIS values could arrive as WKT or hex depending on load path and shape.
Replace custom point formatting with PostGIS `ST_AsText` for String targets so COPY loads and WAL replay produce consistent WKT.

| PostgreSQL geometry/geography subtype | ClickHouse type |
| --- | --- |
| 2-D Point | Point |
| 2-D LineString | LineString |
| 2-D Polygon | Polygon |
| 2-D MultiLineString | MultiLineString |
| 2-D MultiPolygon | MultiPolygon |
| Other subtypes, Z/M, unconstrained columns | String (WKT) |
@serprex
serprex requested a review from harshil-goel November 8, 2026 13:45
@serprex

serprex commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

noticed WKT/hex issue while working on #305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant