pg_geohash
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_geohash | 1.0 | GIS | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 1590 | pg_geohash | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0 | 1817161514 | pg_geohash | - |
| RPM | PIGSTY | 1.0 | 1817161514 | pg_geohash_$v | - |
| DEB | PIGSTY | 1.0 | 1817161514 | postgresql-$v-pg-geohash | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0 el8.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el8.x86_64.rpm
| PIGSTY 1.0 el8.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0 el8.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el8.aarch64.rpm
| PIGSTY 1.0 el8.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0 el9.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el9.x86_64.rpm
| PIGSTY 1.0 el9.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0 el9.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el9.aarch64.rpm
| PIGSTY 1.0 el9.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.0 el10.x86_64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el10.x86_64.rpm
| PIGSTY 1.0 el10.x86_64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.0 el10.aarch64.pg18 : pg_geohash_18 pg_geohash_18-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg17 : pg_geohash_17 pg_geohash_17-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg16 : pg_geohash_16 pg_geohash_16-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg15 : pg_geohash_15 pg_geohash_15-1.0-4PGSTY.el10.aarch64.rpm
| PIGSTY 1.0 el10.aarch64.pg14 : pg_geohash_14 pg_geohash_14-1.0-4PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.0 d12.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
| PIGSTY 1.0 d12.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.0 d12.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
| PIGSTY 1.0 d12.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.0 d13.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
| PIGSTY 1.0 d13.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.0 d13.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
| PIGSTY 1.0 d13.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.0 u22.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
| PIGSTY 1.0 u22.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.0 u22.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
| PIGSTY 1.0 u22.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.0 u24.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~noble_amd64.deb
| PIGSTY 1.0 u24.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.0 u24.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~noble_arm64.deb
| PIGSTY 1.0 u24.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.0 u26.x86_64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
| PIGSTY 1.0 u26.x86_64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.0 u26.aarch64.pg18 : postgresql-18-pg-geohash postgresql-18-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg17 : postgresql-17-pg-geohash postgresql-17-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg16 : postgresql-16-pg-geohash postgresql-16-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg15 : postgresql-15-pg-geohash postgresql-15-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
| PIGSTY 1.0 u26.aarch64.pg14 : postgresql-14-pg-geohash postgresql-14-pg-geohash_1.0-4PGSTY~resolute_arm64.deb
|
Build
You can build the RPM / DEB packages for pg_geohash using pig build:
Install
You can install pg_geohash directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Create Extension:
Usage
C-based geohash functions for PostgreSQL (also supports HAWQ and Greenplum). Based on the libgeohash C library.
Background on geohash: Wikipedia: Geohash
Functions
Encode latitude/longitude to a geohash string with specified precision:
Encode latitude/longitude to a full-precision geohash:
Decode a geohash back to latitude/longitude:
Example
Compute geohash-based aggregates using 5-character precision (~2.4km x 4.9km cells):
Recover coordinates from a geohash:
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)