pg_xenophile
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_xenophile | 0.8.3 | TYPE | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3610 | pg_xenophile | No | No | No | Yes | No | No | xeno |
| 3611 | l10n_table_dependent_extension | No | No | No | Yes | Yes | Yes | - |
| Related | country currency icu_ext prefix semver unit pgpdf pglite_fusion |
|---|---|
| Depended By | l10n_table_dependent_extension |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.8.3 | 1817161514 | pg_xenophile | - |
| RPM | PIGSTY | 0.8.3 | 1817161514 | pg_xenophile_$v | - |
| DEB | PIGSTY | 0.8.3 | 1817161514 | postgresql-$v-pg-xenophile | - |
Build
You can build the RPM / DEB packages for pg_xenophile using pig build:
pig build pkg pg_xenophile # build RPM / DEB packages
Install
You can install pg_xenophile 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:
pig install pg_xenophile; # Install for current active PG version
pig ext install -y pg_xenophile -v 18 # PG 18
pig ext install -y pg_xenophile -v 17 # PG 17
pig ext install -y pg_xenophile -v 16 # PG 16
pig ext install -y pg_xenophile -v 15 # PG 15
pig ext install -y pg_xenophile -v 14 # PG 14
dnf install -y pg_xenophile_18 # PG 18
dnf install -y pg_xenophile_17 # PG 17
dnf install -y pg_xenophile_16 # PG 16
dnf install -y pg_xenophile_15 # PG 15
dnf install -y pg_xenophile_14 # PG 14
apt install -y postgresql-18-pg-xenophile # PG 18
apt install -y postgresql-17-pg-xenophile # PG 17
apt install -y postgresql-16-pg-xenophile # PG 16
apt install -y postgresql-15-pg-xenophile # PG 15
apt install -y postgresql-14-pg-xenophile # PG 14
Create Extension:
CREATE EXTENSION pg_xenophile;
Usage
pg_xenophile: internationalization (i18n) and localization (l10n) utilities
The pg_xenophile extension provides i18n/l10n infrastructure including reference data for countries, languages, and currencies, plus automated localization table management.
CREATE EXTENSION pg_xenophile CASCADE;
All objects reside in the xeno schema (non-relocatable).
Reference Tables
xeno.country: ISO 3166-1 codes with calling codes and currenciesxeno.lang: ISO 639-1 language codesxeno.currency: ISO 4217 currency codes with symbolsxeno.country_subdivision: ISO 3166-2 subdivision codesxeno.eu_country: EU membership trackingxeno.country_postal_code_pattern: Postal code validation patterns
Localization Tables
The extension auto-manages translation tables. Insert into xeno.l10n_table to register a translatable base table:
INSERT INTO xeno.l10n_table (base_table_schema, base_table_name)
VALUES ('public', 'products');
This automatically creates a companion products_l10n table and language-specific views.
Convenience Views
xeno.country_l10n_en: Country names in Englishxeno.lang_l10n_en: Language names in Englishxeno.country_subdivision_l10n_en: Subdivision names in English
Configuration
SET pg_xenophile.base_lang_code = 'en';
SET pg_xenophile.user_lang_code = 'en';
SET pg_xenophile.target_lang_codes = '{nl,fr,de}';
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.