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之间。大小写不敏感。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!