Okay, I get it. Data in PostgreSQL is case-sensitive. And I know I can use LOWER() to make my queries case-insensitive. I know there might even be a "citext" type in a future version of PostgreSQL. My question is, today, how do you deal with this when designing user interfaces? I'm thinking specifically of uniqueness constraints.
Let's say my application's data looks more or less like a file system (think Google Docs, except that Google Docs actually allows duplicate names :-P). How can I make it easy for our users to understand the fact that they can have duplicate names, if the case is different? I think to most people, it will just seem weird.
Let's pre-emptively get some questions out of the way:
I come from a Windows background, so case-insensitivity is how I "think". I now primarily use Mac OS X, which (did you know?) is also case-insensitive. The majority of our users fit into these same two buckets.
I'm new to PostgreSQL. Most of my experience is with MySQL, but I've also used Oracle, which is case-sensitive like PostgreSQL. I thought a lot of about this issue then, too, but ultimately left everything as-is and let our users just figure it out.
I'm interested in both technical solutions (i.e. making this problem just go away) and UI design solutions (i.e. helping the user feel comfortable with the system).
Summary:
- How do you deal with case insensitivity when designing user interfaces?
- How can I make it easy for our users to understand the fact that they can have duplicate names, if the case is different?
EDIT: I appreciate all the feedback so far. However, if the answer is "don't allow duplicate names if they differ by case", then how do I implement it in PostgreSQL? One solution I've considered is silently maintaining a separate column which is always the LOWER() version of the data, and putting the unique constraint on this column.