Min and max aggregates for UUIDs

From: Rudolph Froger <rudolphfroger(at)dreamsolution(dot)nl>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Min and max aggregates for UUIDs
Date: 2026-04-08 06:57:28
Message-ID: 442cefbe-b6e9-45e9-a82f-3e057b35eb61@dreamsolution.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

With the support for UUIDv7 in PostgreSQL 18 it also makes sense to
support aggregates like `min` and `max` for UUIDs.

For example for queries like these:

SELECT bookshop_id, uuid_extract_timestamp(max(id)) AS
latest_book_created FROM books GROUP BY bookshop_id;

In the meantime I use custom aggregates but it would be great to have
these builtin.

BTW many thanks for the great UUIDv7 support and all the fantastic work
on PostgreSQL!

Cheers, Rudolph

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2026-04-08 09:02:07 Re: configure && --with
Previous Message Matthias Apitz 2026-04-08 06:57:24 Re: configure && --with