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.2 |
TYPE | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-dt- | No | Yes | No | Yes | no | yes |
| Relationships | |
|---|---|
| See Also | country pg_xenophile icu_ext currency asn1oid uri gb18030_2022 pg_cjk_parser |
Packages
| PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|
| 1.2 | 1.2 | 1.2 | 1.2 | 1.2 |
This is a built-in contrib extension ship with the PostgreSQL kernel
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.