pg_text_semver
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
pg_text_semver | 1.2.1 | TYPE | PostgreSQL | SQL |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 3520 | pg_text_semver | No | No | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.2.1 | 1817161514 | pg_text_semver | - |
| RPM | PIGSTY | 1.2.1 | 1817161514 | pg_text_semver_$v | - |
| DEB | PIGSTY | 1.2.1 | 1817161514 | postgresql-$v-pg-text-semver | - |
Build
You can build the RPM / DEB packages for pg_text_semver using pig build:
pig build pkg pg_text_semver # build RPM / DEB packages
Install
You can install pg_text_semver directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
pig repo add pgsql -u # Add repo and update cache
Install the extension using pig or apt/yum/dnf:
pig install pg_text_semver; # Install for current active PG version
pig ext install -y pg_text_semver -v 18 # PG 18
pig ext install -y pg_text_semver -v 17 # PG 17
pig ext install -y pg_text_semver -v 16 # PG 16
pig ext install -y pg_text_semver -v 15 # PG 15
pig ext install -y pg_text_semver -v 14 # PG 14
dnf install -y pg_text_semver_18 # PG 18
dnf install -y pg_text_semver_17 # PG 17
dnf install -y pg_text_semver_16 # PG 16
dnf install -y pg_text_semver_15 # PG 15
dnf install -y pg_text_semver_14 # PG 14
apt install -y postgresql-18-pg-text-semver # PG 18
apt install -y postgresql-17-pg-text-semver # PG 17
apt install -y postgresql-16-pg-text-semver # PG 16
apt install -y postgresql-15-pg-text-semver # PG 15
apt install -y postgresql-14-pg-text-semver # PG 14
Create Extension:
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.
Feedback
Was this page helpful?
Thanks for the feedback! Please let us know how we can improve.
Sorry to hear that. Please let us know how we can improve.