pg_xenophile
pg_xenophile
pg_xenophile : More than the bare necessities for PostgreSQL i18n and l10n.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3610 | pg_xenophile
|
pg_xenophile
|
0.8.3 |
TYPE
|
PostgreSQL
|
SQL
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
----d--
|
No
|
No
|
No
|
Yes
|
no
|
no
|
| Relationships | |
|---|---|
| Schemas | xeno |
| Requires | hstore
|
| Need By | l10n_table_dependent_extension
|
| See Also | country
currency
icu_ext
prefix
semver
unit
pgpdf
pglite_fusion
|
| Siblings | l10n_table_dependent_extension
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
0.8.3 |
18
17
16
15
14
|
pg_xenophile |
hstore |
| RPM | PIGSTY
|
0.8.3 |
18
17
16
15
14
|
pg_xenophile_$v |
- |
| DEB | PIGSTY
|
0.8.3 |
18
17
16
15
14
|
postgresql-$v-pg-xenophile |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
el8.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
el9.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
el9.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
el10.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
el10.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
d12.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
d12.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
d13.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
d13.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
u22.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
u22.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
u24.x86_64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
u24.aarch64
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
PIGSTY 0.8.3
|
Source
pig build pkg pg_xenophile; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_xenophile; # install via package name, for the active PG version
pig install pg_xenophile -v 18; # install for PG 18
pig install pg_xenophile -v 17; # install for PG 17
pig install pg_xenophile -v 16; # install for PG 16
pig install pg_xenophile -v 15; # install for PG 15
pig install pg_xenophile -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pg_xenophile CASCADE; -- requires hstoreUsage
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}';Last updated on