lightdb原生支持uuid(), sys_guid()函数。
lightdb@postgres=# create table test_uuid(uuid_t uuid);
CREATE TABLE
lightdb@postgres=# insert into test_uuid values(uuid());
INSERT 0 1
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c0925d');
INSERT 0 1
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c0925');
ERROR: invalid input syntax for type uuid: "d36ffa32-5ce9-4471-a617-9d4522c0925"
LINE 1: insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522...
^
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c09251');
INSERT 0 1
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c0925x');
ERROR: invalid input syntax for type uuid: "d36ffa32-5ce9-4471-a617-9d4522c0925x"
LINE 1: insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522...
^
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c0925F');
INSERT 0 1
lightdb@postgres=# insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522c0925g');
ERROR: invalid input syntax for type uuid: "d36ffa32-5ce9-4471-a617-9d4522c0925g"
LINE 1: insert into test_uuid values('d36ffa32-5ce9-4471-a617-9d4522...

uuid的取值必须是d36ffa32-5ce9-4471-a617-9d4522c09251格式,且取值必须是0-f之间。大小写不敏感。