It would be great, if we could declare within CREATE/DDL, that ids of a UUID column are to be auto-created via gen_random_uuid(). This feature would be analogue to SERIAL for integer sequences.
Currently Kuzu provides gen_random_uuid() for UUIDv4 auto-creation. But the need to invoke this function manually for new nodes with UUID primary key is inconvenient and sometimes not easily possible - as seen with MERGE in #3014. Actually I think proposal here is more useful than linked one.
PostgreSQL provides DEFAULT value keyword within CREATE in combination with equally named gen_random_uuid() for these cases (more examples in 1, 2):
CREATE TABLE table_name (
unique_id UUID DEFAULT gen_random_uuid(),
...
PRIMARY KEY (unique_id)
);
or with directly prepended PRIMARY KEY:
CREATE TABLE table_name (
unique_id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
...
);
, requested for Kuzu in #2911.
I think this would be a nice addition to usability of UUIDs.