• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

babelfish-for-postgresql / babelfish_extensions / 24550159717
78%

Build:
DEFAULT BRANCH: BABEL_6_X_DEV
Ran 17 Apr 2026 06:34AM UTC
Jobs 1
Files 121
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

17 Apr 2026 05:54AM UTC coverage: 77.15% (+0.07%) from 77.078%
24550159717

push

github

web-flow
Add MultiPoint datatype support   (#4719)

**Currently**, Babelfish supports `geometry` and `geography` spatial types for `Point`, `LineString`, and `Polygon` geometries. Attempting to use `MultiPoint` geometry type results in an *"unsupported geometry type"* error across all input/output paths including WKT text input, binary (`varbinary`) conversion, and spatial functions like `STGeomFromText` and `STMPointFromText`.

**With this change**, Babelfish now fully supports the **MultiPoint** geometry type for both `geometry` and `geography` data types. Users can create, store, retrieve, convert, and validate MultiPoint geometries through all existing spatial interfaces, matching T-SQLServer behavior.

**Why:** MultiPoint is a fundamental OGC geometry type used in real-world spatial applications to represent collections of discrete point locations (e.g., sensor networks, store locations, sample sites). Supporting it closes a significant gap in spatial type coverage and moves Babelfish closer to full T-SQL spatial compatibility.

**How the code was changed:**

1. **WKT Parser (grammar + rewrite functions):** Added grammar rules for parsing `MULTIPOINT((x y), ...)` and `MULTIPOINT Z/M/ZM(...)` syntax in both parenthesized and bare coordinate formats. Added `rewrite_multipoint_wkt()` and `rewrite_dim_multipoint_wkt()` functions for WKT normalization.

2. **T-SQL CLR Binary ↔ PostGIS WKB conversion (`spatialtypes.c`):**
   - **Bytea → PostGIS (T-SQL input):** Added CLR figure/shape metadata parsing for MultiPoint, validation of `STROKE` figures and `POINT` child shapes, and conversion from CLR columnar coordinate layout to PostGIS WKB MultiPoint format.
   - **PostGIS → Bytea (T-SQL output):** Added de-interleaving of PostGIS per-point WKB into CLR columnar format (XY block, Z block, M block), plus CLR metadata serialization (figures + shapes arrays).

3. **Geography validation:** Added MultiPoint coordinate validation for latitude/longitude range constraints... (continued)

307 of 327 new or added lines in 4 files covered. (93.88%)

53343 of 69142 relevant lines covered (77.15%)

624064.86 hits per line

Uncovered Changes

Lines Coverage ∆ File
13
94.78
0.02% contrib/babelfishpg_common/src/spatialtypes.c
5
93.94
-1.14% contrib/babelfishpg_common/src/geo.c
2
96.36
-1.0% contrib/babelfishpg_common/src/geo_parser.y
Jobs
ID Job ID Ran Files Coverage
1 24550159717.1 17 Apr 2026 06:34AM UTC 121
77.15
GitHub Action Run
Source Files on build 24550159717
  • Tree
  • List 121
  • Changed 4
  • Source Changed 4
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24550159717
  • 7d751466 on github
  • Prev Build on BABEL_6_1_STABLE (#24451661273)
  • Next Build on BABEL_6_X_DEV (#24568264121)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc