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.3 |
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
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.0.3 |
18 17 16 15 14 | pg_country |
- |
| RPM | PIGSTY | 0.0.3 |
18 17 16 15 14 | pg_country_$v |
- |
| DEB | PIGSTY | 0.0.3 |
18 17 16 15 14 | postgresql-$v-pg-country |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| el8.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| el9.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| el9.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| el10.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| el10.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| d12.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| d12.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| d13.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| d13.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u22.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u22.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u24.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u24.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u26.x86_64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
| u26.aarch64 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 | PIGSTY 0.0.3 |
Source
github.com/adjust/pg-country
pg-country-0.0.3.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.