pg_currency
pg_extensions · Currency catalogs and dated base-relative exchange rates.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102090 | pg_currency | pg_extensions | 0.3.1 | FUNC | Matroid-SAL-1.0 | Rust |
PostgreSQL · 14, 15, 16, 17, 18
Usage
Sources:
- extensions/pg_currency/pg_currency.control
- README.md
- extensions/pg_currency/Cargo.toml
- extensions/pg_currency/src/lib.rs
- CHANGELOG.md
- LICENSE
- extensions/pg_currency/src/seed.rs
- extensions/pg_currency/src/rate.rs
- extensions/pg_currency/src/convert.rs
pg_currency 0.3.0 stores currency definitions and dated exchange rates in pgcurrency, and converts amounts by base-relative triangulation.
Core Workflow
Operational Boundaries
The control does not require superuser-only installation, but object-creation privileges still apply. No preload is required. Rates are supplied by the operator; no live market feed is included. pgcurrency.base_currency defaults to USD, and the base rate is one. set_rate stores rate/date/type/source, while get_rate, convert and round_to_currency apply historical lookup and currency precision. Missing required rates raise errors. This is distinct from the existing currency-type extension with a similarly named source package. This is an unsupported proof of concept under Matroid Source Available License 1.0. APIs may change. Version 0.3.0 is the new upgrade baseline: earlier 0.2.0 installations require a rehearsed data migration/recreation, not ordinary ALTER EXTENSION UPDATE. Back up data and dependencies before following that destructive upstream path.