pg_text_semver
pg_text_semver
pg_text_semver : Semantic version domain and comparison operators for PostgreSQL
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 3520 | pg_text_semver | pg_text_semver | 1.2.1 | TYPE | PostgreSQL | SQL |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
----d-r | No | No | No | Yes | yes | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.2.1 | 18 17 16 15 14 | pg_text_semver | - |
| RPM | PIGSTY | 1.2.1 | 18 17 16 15 14 | pg_text_semver_$v | - |
| DEB | PIGSTY | 1.2.1 | 18 17 16 15 14 | postgresql-$v-pg-text-semver | - |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
el8.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
el9.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
el9.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
el10.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
el10.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
d12.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
d12.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
d13.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
d13.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
u22.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
u22.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
u24.x86_64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
u24.aarch64 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 | PIGSTY 1.2.1 |
Source
pig build pkg pg_text_semver; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_text_semver; # install via package name, for the active PG version
pig install pg_text_semver -v 18; # install for PG 18
pig install pg_text_semver -v 17; # install for PG 17
pig install pg_text_semver -v 16; # install for PG 16
pig install pg_text_semver -v 15; # install for PG 15
pig install pg_text_semver -v 14; # install for PG 14Create this extension with:
CREATE EXTENSION pg_text_semver;Usage
- Source: GitHub repo, README
pg_text_semverimplements Semantic Versioning 2.0.0 on top of PostgreSQLtext, using asemverdomain and related helper types/functions.
CREATE EXTENSION pg_text_semver;Core Workflow
The README highlights these capabilities:
- compare
semvervalues with the usual comparison operators - call
semver_cmp(semver, semver)directly - validate and inspect version strings with
semver_regexp() - cast parsed values to
semver_parsedfor sorting and indexing - use
semver_prereleasefor prerelease validation and comparison
Examples
The upstream README points users to the test__pg_text_semver() procedure for concrete examples of the types, operators, and functions. It also notes that the extension ships a separate semver_parsed type that can be serialized back to semver or text.
Notes
The README contrasts this project with C-based semver extensions: pg_text_semver stays on text-backed domains and focuses on a simple, spec-oriented implementation.
Last updated on