↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Uuid Functions

uuid_extract_timestamp

Read the PG 18 manual

Extracts a timestamp with time zone from a UUID of version 1 or 7.

Reading PG 18current·documented in 4 of 27 versions, 17 to 20

Signatures & examples

uuid_extract_timestamp ( uuid ) → timestamp with time zone
Extracts a timestamp with time zone from a UUID of version 1 or 7. For other versions, this function returns null. Note that the extracted timestamp is not necessarily exactly equal to the time the UUID was generated; this depends on the implementation that generated the UUID.
uuid_extract_timestamp('019535d9-3df7-79fb-b466-​fa907fa17f9e'::uuid) → 2025-02-23 21:46:24.503-05
Version history 3
  1. 19 → 20 changed
  2. 17 → 18 changed
  3. 16 → 17 added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source