Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的表上有一个具有唯一键属性的列,但我也希望它以一种不敏感的方式是唯一的。如果有一个像 xyz 这样的键,插入语句的值 Xyz,xYZ 可以正常工作,我想要阻止。我可以用什么来实现这一目标?(我正在使用 postgresql。)
我认为你可以这样做:
create unique index on tableName (lower(columnName))