Skip to content

edtf_postgres

EDTF validation, normalization, date bounds, and temporal relations

Overview

PackageVersionCategoryLicenseLanguage
edtf_postgres1.2.3TIMEMIT OR Apache-2.0Rust
IDExtensionBinLibLoadCreateTrustRelocSchema
1130edtf_postgresNoYesNoYesYesYes-

Trusted extension; upstream Cargo requests pgrx 0.19.1 and the locked build uses 0.19.2.

Version

TypeRepoVersionPG VerPackageDeps
EXTPIGSTY1.2.31817161514edtf_postgres-
RPMPIGSTY1.2.31817161514edtf_postgres_$v-
DEBPIGSTY1.2.31817161514postgresql-$v-edtf-postgres-
OS / PGPG18PG17PG16PG15PG14
el8.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
el8.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
el9.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
el9.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
el10.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
el10.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
d12.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
d12.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
d13.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
d13.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u22.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u22.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u24.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u24.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u26.x86_64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
u26.aarch64
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3
PIGSTY 1.2.3

Build

You can build the RPM / DEB packages for edtf_postgres using pig build:

pig build pkg edtf_postgres         # build RPM / DEB packages

Install

You can install edtf_postgres 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:

Install
pig install edtf_postgres;          # Install for current active PG version
pig
pig ext install -y edtf_postgres -v 18  # PG 18
pig ext install -y edtf_postgres -v 17  # PG 17
pig ext install -y edtf_postgres -v 16  # PG 16
pig ext install -y edtf_postgres -v 15  # PG 15
pig ext install -y edtf_postgres -v 14  # PG 14
dnf
dnf install -y edtf_postgres_18       # PG 18
dnf install -y edtf_postgres_17       # PG 17
dnf install -y edtf_postgres_16       # PG 16
dnf install -y edtf_postgres_15       # PG 15
dnf install -y edtf_postgres_14       # PG 14
apt
apt install -y postgresql-18-edtf-postgres   # PG 18
apt install -y postgresql-17-edtf-postgres   # PG 17
apt install -y postgresql-16-edtf-postgres   # PG 16
apt install -y postgresql-15-edtf-postgres   # PG 15
apt install -y postgresql-14-edtf-postgres   # PG 14

Create Extension:

CREATE EXTENSION edtf_postgres;

Usage

Sources:

edtf_postgres exposes Extended Date/Time Format validation, normalization, bounds, and temporal relations for ISO 8601-2:2019 Annex A strings.

Enablement

Release 1.2.3 publishes artifacts for PostgreSQL 14–18 on amd64 and arm64. Install the matching artifact, then run:

CREATE EXTENSION edtf_postgres;

The extension is relocatable and trusted, so a role with database CREATE privilege can install it. It does not require preloading.

Validation and Canonical Form

Use edtf_valid before accepting external text, edtf_level to inspect the supported EDTF level, and edtf_canonical to normalize equivalent forms.

SELECT edtf_valid('1985-04-12');
SELECT edtf_level('1985-04-12/..');
SELECT edtf_canonical('1985-04-12');

edtf_min and edtf_max return index-friendly date bounds. edtf_relation compares two expressions and returns a three-valued temporal relation.

SELECT edtf_min('1985-04'), edtf_max('1985-04');
SELECT edtf_relation('1985', '1986');

Data Modeling Boundary

The extension operates on text and derived dates; it does not replace application validation or introduce a stored EDTF base type. Preserve the original expression when uncertainty and qualifiers are significant, and index derived bounds only for the query semantics your application intends.

Was this page helpful?