postgresql_16:9.6.21.2 Casts
PostgreSQL 16 > Appendixes > Additional Supplied Modules and Extensions > isn — data types for international standard numbers (ISBN, EAN, UPC, etc.) > Casts
The isn module provides the following pairs of type casts:
- ISBN13 <=> EAN13
- ISMN13 <=> EAN13
- ISSN13 <=> EAN13
- ISBN <=> EAN13
- ISMN <=> EAN13
- ISSN <=> EAN13
- UPC <=> EAN13
- ISBN <=> ISBN13
- ISMN <=> ISMN13
- ISSN <=> ISSN13
When casting from EAN13 to another type, there is a run-time check that the value is within the domain of the other type, and an error is thrown if not. The other casts are simply relabelings that will always succeed.