libversion
postgresql-libversion · Version string comparison functions and versiontext type using libversion
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100302 | libversion | postgresql-libversion | 2.0.0 | TYPE | MIT | C |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16
Usage
Sources:
libversion compares package-style version strings through the external libversion library. It provides comparison functions and a versiontext type whose equality and ordering use version semantics rather than lexical text order.
version_compare4 accepts a flag for each operand; helper functions expose libversion flags such as VERSIONFLAG_P_IS_PATCH, VERSIONFLAG_LOWER_BOUND, and VERSIONFLAG_UPPER_BOUND.
The extension requires the matching libversion development and runtime library. Its cataloged compatibility ends at PostgreSQL 16, so validate source and binary builds on newer majors. A versiontext index depends on this comparison behavior: keep library versions consistent across primary, replicas, dump/restore targets, and logical subscribers to avoid ordering disagreement.