pgsql-general
❮
Min and max aggregates for UUIDs
- Jump to comment-1Rudolph Froger<rudolphfroger@dreamsolution.nl>Apr 8, 2026, 7:00 AM UTCHi,
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:
In the meantime I use custom aggregates but it would be great to have these builtin.SELECT bookshop_id, uuid_extract_timestamp(max(id)) AS latest_book_created FROM books GROUP BY bookshop_id;
BTW many thanks for the great UUIDv7 support and all the fantastic work on PostgreSQL!
Cheers, Rudolph