Skip to content

pg_temporal

PostgreSQL extension adding Temporal ZonedDateTime support.

pg_temporal · PostgreSQL extension adding Temporal ZonedDateTime support.

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
100896pg_temporalpg_temporal1.0.0TYPEUnknownRust

PostgreSQL · 12, 13, 14, 15, 16, 17

Usage

Sources:

pg_temporal version 1.0.0 adds a ZonedDateTime type backed by the Rust Jiff library, intended to represent a local date/time together with an offset and named time zone. The type has input/output, equality, ordering, and hashing support; zdt_now() returns the current zoned time.

Example

CREATE EXTENSION pg_temporal;
SELECT zdt_now(), pg_typeof(zdt_now());

The current API is very small: it supplies the type and current-time function but no documented conversions or arithmetic. Installation is superuser-only. Parsing uses the bundled Jiff/tz data and invalid text reaches an unwrap path; behavior can differ from PostgreSQL timestamptz and its time-zone database. Validate accepted serialization, comparison semantics, upgrades, and tz-data changes before using the type in durable schemas.

Table reader