唯一索引
最近更新时间: 2025-02-18 16:02:00
- 创建唯一索引。
postgres=# create unique index t_first_col_share_id_uidx on t_first_col_share using btree(id);
CREATE INDEX
- 非shard key字段不能建立唯一索引。
postgres=# create unique index t_first_col_share_nickname_uidx on t_first_col_share using btree(nickname);
ERROR: Unique index of partitioned table must contain the hash/modulo distribution column.