finds.dev← search

// the find

postgis/h3-pg

★ 385 · PLpgSQL · Apache-2.0 · updated Jun 2026

PostgreSQL bindings for H3, a hierarchical hexagonal geospatial indexing system

A PostgreSQL extension that wraps Uber's H3 hexagonal grid library and exposes its indexing, traversal, hierarchy, and region functions as snake_case SQL. It is for people who want hex-grid bucketing or spatial joins inside Postgres instead of in application code. The core is C with SQL install scripts, so the PLpgSQL label on GitHub is misleading.

Index operator classes for btree, hash, GiST, SP-GiST, and BRIN on the cell type (h3/src/opclass_*.c) let cells be indexed and joined as native values instead of cast to text. Each area of the API has its own regression test with expected output, and CI runs the suite on Linux, macOS, and Windows. Distribution goes beyond make install: PGXN, PGDG apt and yum packages, and the PostGIS Windows bundle, with upgrade scripts chained from 0.1.0 through the 4.5.0 development step, so a live cluster can move forward without a dump and reload. The scope line is explicit: the README says new features outside the H3 API will rarely be accepted, which keeps this a thin binding you can check against upstream docs.

The v3 to v4 change renamed nearly every function from camelCase to snake_case. Compatibility rests on 99-deprecated.sql and the CHANGELOG, so existing SQL needs an audit, not just an ALTER EXTENSION UPDATE. The h3_postgis companion, which covers the geometry and raster side and presumably needs PostGIS, is not mentioned in the README at all, so most readers won't know it exists or what it pulls in. The README says CI tests PostgreSQL 14-18 on Linux and macOS, but there is a Windows workflow too, so the documented support matrix has drifted. The Windows install goes through the PostGIS bundle, which means the H3 version you get is whatever that bundle ships.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →