refer to:
https://stackoverflow.com/questions/44274080/postgres-hash-index-with-unique-constraint
No unique index found for xx...
这个时候要注意了,postgres 的默认索引是有 btree, 是有unique 约束的,但是hash索引则没有。
自己摸索出来的办法: 使用
psql=# alter table udts add constraint unique_type_hash unique (type_hash);
就可以实现了
删除某个constraint/ index:
ALTER TABLE your_schema.your_table DROP CONSTRAINT constraint_name;