iban
iban · International Bank Account Number type with format and checksum validation
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3685 | iban | iban | 1.2.0 | TYPE | GPL-3.0-or-later | C++ |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| el8.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| el9.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| el9.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| el10.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| el10.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| d12.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| d12.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| d13.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| d13.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u22.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u22.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u24.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u24.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u26.x86_64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
| u26.aarch64 | N/A | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 | PIGSTY 1.2.0 |
Source
github.com/yorickdewid/PostgreSQL-IBAN
iban-1.2.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
iban SQL 1.2, distributed as upstream 1.2.0, adds a validated International Bank Account Number type and iban_validate(text). Country-specific BBAN structure and a mod-97 checksum reject malformed values; successful validation does not prove account existence, ownership or payment-network reachability. Upstream supports PostgreSQL 14–18.
Store and Compare Values
Text input is uppercased and plain spaces are removed, so the stored value in this example is GB82WEST12345698765432. Tabs, newlines and other whitespace are not removed. Input longer than 64 bytes is rejected; error output repeats at most 40 input bytes. Binary input is now validated and normalized by the same rules.
Objects
iban_validate(text)returns a validation result without storing a value.ibansupports casts to text types and comparison operators.iban_cmp(iban, iban)provides byte-order comparison.- Default btree and hash operator classes support ordering, equality, joins, grouping and keys;
iban_hash(iban)andiban_hash_extended(iban, bigint)support hash operations.
Upgrade and Validation Boundaries
Install matching files, ensure old-library sessions are replaced, then upgrade SQL and normalize rows stored by older versions:
Review existing values and uniqueness collisions before rewriting production data or creating unique indexes: older rows may retain lowercase or noncanonical representations. Country rules are compiled into the extension and may lag registry changes; verify the countries required by the application against this exact release.