country
Country data type, ISO 3166-1
pg_country : Country data type, ISO 3166-1
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3660 | country | pg_country | 0.0.4 |
TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | isn pg_xenophile icu_ext currency asn1oid uri gb18030_2022 pg_cjk_parser |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| el8.aarch64 | N/A | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| el9.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| el9.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| el10.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| el10.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| d12.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| d12.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| d13.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| d13.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u22.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u22.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u24.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u24.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u26.x86_64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
| u26.aarch64 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 | PIGSTY 0.0.4 |
Source
github.com/adjust/pg-country
pg-country-0.0.4.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
The country extension provides an enumerated data type for ISO 3166-1 alpha-2 country codes with minimal storage overhead.
Data Type
The country type restricts values to valid ISO 3166-1 alpha-2 codes (two-letter country designations like US, GB, FR, DE, etc.). Invalid codes are rejected on input.
Operators
Standard comparison operators are supported: =, <>, <, >, <=, >=.
Index Support
Both B-tree and hash index operator classes are provided for efficient querying and sorting on country columns.