Skip to content

addressing_dictionary

Address-aware text search dictionaries and configurations

Overview

PackageVersionCategoryLicenseLanguage
addressing_dictionary1.1FTSMITSQL
IDExtensionBinLibLoadCreateTrustRelocSchema
2270addressing_dictionaryNoNoNoYesNoYes-

SQL and dictionary data only; no shared library. PostgreSQL 14-18 verified in PGSTY builds; upstream declares no current major-version matrix.

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY1.11817161514addressing_dictionary-
RPMPIGSTY1.11817161514addressing_dictionary_$v-
DEBPIGSTY1.11817161514postgresql-$v-addressing-dictionary-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
el8.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
el9.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
el9.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
el10.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
el10.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
d12.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
d12.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
d13.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
d13.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u22.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u22.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u24.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u24.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u26.x86_64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
u26.aarch64
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1
PIGSTY 1.1

Build

You can build the RPM / DEB packages for addressing_dictionary using pig build:

pig build pkg addressing_dictionary         # build RPM / DEB packages

Install

You can install addressing_dictionary directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:

pig repo add pgsql -u          # Add repo and update cache

Install the extension using pig or apt/yum/dnf:

Install
pig install addressing_dictionary;          # Install for current active PG version
pig
pig ext install -y addressing_dictionary -v 18  # PG 18
pig ext install -y addressing_dictionary -v 17  # PG 17
pig ext install -y addressing_dictionary -v 16  # PG 16
pig ext install -y addressing_dictionary -v 15  # PG 15
pig ext install -y addressing_dictionary -v 14  # PG 14
dnf
dnf install -y addressing_dictionary_18       # PG 18
dnf install -y addressing_dictionary_17       # PG 17
dnf install -y addressing_dictionary_16       # PG 16
dnf install -y addressing_dictionary_15       # PG 15
dnf install -y addressing_dictionary_14       # PG 14
apt
apt install -y postgresql-18-addressing-dictionary   # PG 18
apt install -y postgresql-17-addressing-dictionary   # PG 17
apt install -y postgresql-16-addressing-dictionary   # PG 16
apt install -y postgresql-15-addressing-dictionary   # PG 15
apt install -y postgresql-14-addressing-dictionary   # PG 14

Create Extension:

CREATE EXTENSION addressing_dictionary;

Usage

Sources:

addressing_dictionary installs address-oriented full-text-search configurations and dictionaries. It is useful for approximate local address lookup where street-type, direction, and ordinal variants should normalize to comparable lexemes; it is not a geocoder or a substitute for address parsing and validation.

Core Workflow

Install the extension once in the database, normalize address text with the supplied configuration, and index the same expression used by queries.

CREATE EXTENSION addressing_dictionary;

SELECT to_tsvector('addressing_en', '1234 n main st');

CREATE INDEX address_search_idx
ON address_book
USING gin (to_tsvector('addressing_en', full_address));

SELECT *
FROM address_book
WHERE to_tsvector('addressing_en', full_address)
      @@ plainto_tsquery('addressing_en', '1234 north main street');

Version 1.1 keeps an abbreviated cardinal direction and also emits its expanded form, so an input such as a single-letter north token can produce both forms. This deliberately preserves ambiguity rather than assuming every occurrence has only one meaning.

Installed Objects

  • The English configuration combines a thesaurus, synonym dictionary, and stop-word dictionary for address tokens.
  • The French configuration installs the corresponding French text-search objects.
  • Both configurations are copied from PostgreSQL’s simple configuration, so they normalize through the extension’s data files instead of applying a general-language stemmer.

Operational Boundaries

The extension is relocatable and needs no preload or restart. Its dictionary, synonym, stop-word, and thesaurus files must be installed on every server that may execute queries or restore the extension.

Full-text matching is heuristic. Abbreviations can be ambiguous, and nationwide data can produce many false or duplicate candidates. Use it to improve candidate search—especially for a bounded city or region—and retain separate structured-address or geospatial checks when correctness matters.

Was this page helpful?