nominatim_fdw
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
nominatim_fdw | 2.1.0 | FDW | MIT | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 8680 | nominatim_fdw | No | Yes | No | Yes | No | Yes | - |
PIGSTY RPM and DEB packages are aligned at 2.1.0 for PostgreSQL 14 through 18.
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.1.0 | 1817161514 | nominatim_fdw | - |
| RPM | PIGSTY | 2.1.0 | 1817161514 | nominatim_fdw_$v | - |
| DEB | PIGSTY | 2.1.0 | 1817161514 | postgresql-$v-nominatim-fdw | - |
Build
You can build the RPM / DEB packages for nominatim_fdw using pig build:
Install
You can install nominatim_fdw 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
Sources:
- nominatim_fdw v2.1 README
- nominatim_fdw v2.1 changelog
- nominatim_fdw v2.1 control file
- Official Nominatim API overview
- OpenStreetMap Nominatim usage policy
nominatim_fdw calls a Nominatim geocoding service from PostgreSQL. Unlike a conventional FDW, it exposes functions for search, reverse geocoding, and OSM-object lookup; it does not create queryable foreign tables.
Configure a Server
The public OpenStreetMap endpoint has an official usage policy. For sustained or bulk workloads, use an authorized provider or operate your own Nominatim service, identify the application as required, and respect rate limits.
Version 2.1 supports HTTP Basic authentication through a per-user mapping:
Keep endpoint and proxy credentials in USER MAPPING, where PostgreSQL applies its credential-visibility rules, rather than in foreign-server options.
Core Workflow
Free-form search:
Reverse geocoding and object lookup:
Important Objects
nominatim_search(...)implements free-form or structured forward search.nominatim_reverse(...)resolves longitude and latitude to the nearest suitable OSM address.nominatim_lookup(...)fetches node, way, or relation identifiers such asN123,W456, orR789.nominatim_fdw_version()reports the extension and principal library versions.nominatim_fdw_settingsexposes dependency and build versions as rows.- Server options include
url, proxy configuration, timeouts, retry and redirect limits, and defaultaccept_language.
All endpoint functions are STRICT: an explicit SQL NULL argument returns no rows without sending a request. In 2.0 they are correctly declared VOLATILE, because responses are remote and can change.
Version 2.1 Changes and Caveats
Version 2.0 validates reverse coordinates, adds email, polygon_threshold, and entrances, exposes dependency settings, and fixes JSON escaping for returned detail fields. It also has user-visible compatibility changes: reverse output uses display_name; addressparts becomes addressdetails; address details default to true for reverse and lookup; and version output is shorter.
After installing the 2.1 package files, upgrade existing databases:
Version 2.1 adds Basic-auth mapping and initializes libcurl once per PostgreSQL backend instead of relying on implicit per-request initialization. The libcurl fix requires no new SQL or preload setting.
Each call performs network I/O in the database statement. Use finite timeouts, constrain who can create or alter servers, and avoid invoking a public service once per row in a large query. The upstream build requires PostgreSQL 10 or newer, libxml2 2.5 or newer, and libcurl 7.74 or newer.
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)