Skip to main content
A currency code column is usually a CHAR(3) that accepts any three letters, including the ones that are not currencies. vsql_currency adds a currency type that holds the 164 ISO 4217 codes pg-currency supports, in a single byte, accepts them in any case, and prints them in the canonical uppercase form.

Install

vsql_currency is not bundled with the server, so build it from the repository first and copy the resulting vsql_currency.veb into the directory named by the veb_dir system variable. Then install it:
Confirm it is there:
The build instructions are in the repository.

What it adds

The currency type

Functions

Example

Write the codes in any case, and read them back canonical and in order:
Check a code before you trust it, and list the ones you care about:

See also