蝚砌甇伐撠∼ database table 銝剔 username 撱箇 UNIQUE KEYSQL 憒銝嚗
CREATE UNIQUE INDEX users_unique_username ON the_user_table USING btree (lower(username));
嗡葉 (lower(username)) 冽蝔曹 Functional IndexesUSING btree 舀摰撱箇 KEY 寞嚗甇方箔誑 btree 撱箇銝銝摰閬撖思
蝚砌甇伐 Script 銝剔Ⅱ靽雿輻刻蝔曹銴嚗Case-insensitive 撠
SELECT * FROM the_user_table WHERE lower(username) = '啗酉雿輻刻蝔';
SELECT 蝯曉啁詨雿輻刻蝔梧撠梯”蝷箄府撣唾撌脩銝賜唾
Reference:
Functional Indexes