mysql/lightdb uuid報錯ERROR: invalid input syntax for type uuid: "-1"

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之間。大小寫不敏感。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章