使用uuid做为分布列的方案

最近更新时间: 2024-06-12 15:06:00

目前uuid类型字段不能做为分布列,提示如下:

postgres=# create table t_uuid(f1 uuid );
ERROR:  No appropriate column can be used as distribute key because of data type.

解决方案如下:

postgres=# create table t_uuid(f1 varchar(36) default uuid_nil()::text );
CREATE TABLE
postgres=#