If I create a PostgreSQL unique index on a field, is the comparison case-insensitive by default?
If not, is it possible to ask PostgreSQL to ignore string case?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PostgreSQL is case sensitive. To do what you want create a function index. So say
That way when you use
UPPER(myfield)in your query the index will be used.See this link