isn
data types for international product numbering standards
isn · data types for international product numbering standards
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3930 | isn | isn | 1.3 | TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-dtr | No | Yes | No | Yes | yes | yes |
| Relationships | |
|---|---|
| See Also | country pg_xenophile icu_ext currency asn1oid uri gb18030_2022 pg_cjk_parser |
PG18 SQL/control baseline 1.3; older PostgreSQL majors may differ.
Packages
| PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|
| 1.3 | 1.3 | 1.3 | 1.3 | 1.3 |
This contrib extension ships with PostgreSQL.
Install
Create this extension with:
Usage
The isn extension provides data types for international product numbering standards with validation and check-digit verification.
Data Types
| Type | Description |
|---|---|
EAN13 | European Article Numbers (always 13-digit) |
ISBN13 | International Standard Book Numbers (13-digit) |
ISMN13 | International Standard Music Numbers (13-digit) |
ISSN13 | International Standard Serial Numbers (13-digit) |
ISBN | Book numbers (10-digit short format when possible) |
ISMN | Music numbers (10-digit short format when possible) |
ISSN | Serial numbers (10-digit short format when possible) |
UPC | Universal Product Codes |
Examples
Weak Mode
Enable weak mode to accept invalid check digits (useful for OCR/data cleanup):
Functions
| Function | Description |
|---|---|
is_valid(isn) | Check if value has valid check digit |
make_valid(isn) | Clear the invalid-check-digit flag |
isn_weak() | Return current weak mode status |
isn_weak(boolean) | Set weak mode |
Operators and Indexing
Standard comparison operators (=, <, >, <=, >=, <>) with B-tree and hash index support.