Re: uuidv7 improperly accepts dates before 1970-01-01

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: uuidv7 improperly accepts dates before 1970-01-01
Date: 2026-06-24 20:31:53
Message-ID: CAN4CZFP9XsTXijqxtK7v9Hgad3jQN-m+wBve0azdi3QkheJv7Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hello!

`us` can overflow and while it still results in an error, it is in the
wrong direction:

SELECT uuidv7('292230 years'::interval);
ERROR: timestamp out of range for UUID version 7
DETAIL: UUID version 7 does not support timestamps before the Unix epoch.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jacob Champion 2026-06-24 21:57:13 REVOKE's CASCADE protection doesn't work with INHERITed table owners
Previous Message Christophe Pettus 2026-06-24 20:02:18 Re: uuidv7 improperly accepts dates before 1970-01-01

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2026-06-24 21:19:33 Re: glob support in extension_control_path/dynamic_library_path?
Previous Message Tomas Vondra 2026-06-24 20:26:29 Re: Adding basic NUMA awareness