pg_address
pg_address · Extension creates composite type to store address
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 101041 | pg_address | pg_address | 0.0.3 | TYPE | Unknown | SQL |
Usage
Sources:
pg_address 0.0.3 defines a composite type named pg_address for storing an address as country, region, city, postal code, street, number, suburb, latitude, and longitude fields.
Store and read a composite address
The field order is country, region, city, zip_code, street, num, suburb, lat, and lon. Use an explicit cast or named-field assignment so positional values do not silently drift.
Data-model boundary
This is a storage type, not an address parser, geocoder, or validator. Text fields accept arbitrary values, coordinates have no range constraint, and no normalization or index operator class is supplied. Add application-specific constraints for latitude, longitude, country codes, and required fields.
Composite-type changes can affect dependent tables, functions, clients, and positional row literals. The repository’s installation notes target PostgreSQL 9.6-era development packages and publish no current compatibility matrix; validate extension upgrades and client type decoding on the exact PostgreSQL release before adoption.