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
|
u26.x86_64
|
PIGSTY 1.2.1
|
PIGSTY 1.2.1
|
PIGSTY 1.2.1
|
PIGSTY 1.2.1
|
PIGSTY 1.2.1
|
u26.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: README, META.json, Tag v1.2.1
pg_text_semver implements Semantic Versioning 2.0.0 on top of PostgreSQL text using a semver domain rather than a custom C type.
Core types and functions
CREATE EXTENSION pg_text_semver;
SELECT '1.2.3'::semver < '2.0.0'::semver;
SELECT semver_cmp('1.2.3'::semver, '1.2.4'::semver);
SELECT semver_regexp(true);
SELECT '1.2.3-alpha.1+build5'::semver::semver_parsed;semver: domain overtextwith SemVer validation.semver_parsed: parsed composite type that supports sorting and indexing.semver_prerelease: domain for prerelease identifiers.semver_cmp(...): comparison function forsemverandsemver_parsed.semver_regexp(include_captures boolean): exposes the validation regex.
Extra helpers
The current README also documents PGXN-version-range helpers:
meta_pgxn_version_range(text)meta_pgxn_version_range_cmp(text, text)nonsemver_cmp(text, text, text)
Caveats
- This extension favors a spec-oriented, text-backed implementation over the lower-level C-based alternatives.
- The upstream README remains the authoritative user-facing reference; the current stub already matched that surface closely, so this refresh mainly aligns it with the documented 1.2.1 helper set.
Last updated on