media_types
emi_monorepo · Strongly typed MIME media-type data type for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100810 | media_types | emi_monorepo | 0.1.0 | TYPE | GPL-3.0 | Rust |
PostgreSQL · 13, 14, 15, 16, 17
Usage
Sources:
media_types adds the MediaType type for validated media-type strings such as image/gif. It is useful when content metadata should be parsed and constrained instead of stored as unchecked text.
Core Workflow
The parser checks the root type and subtype against the registry embedded in the build and preserves optional parameters. Unknown combinations are rejected.
SQL Objects
MediaTypeis a variable-length type whose PGRX binary protocol uses CBOR serialization in this release.- Comparison operators
=,<>,<,<=,>, and>=are available. MediaType_btree_opsandMediaType_hash_opssupport B-tree and hash indexes.
Operational Notes
Version 0.1.0 is non-relocatable. Its control file sets superuser = true and trusted = false, so a superuser must create it; it declares no prerequisite extension or preload requirement. The accepted subtype registry is compiled into the extension. Upstream retains some deprecated media types with guidance toward replacements, so application validation and extension upgrades should be reviewed together.