Wednesday, January 21, 2009

Case sensitive - a headache experience

In a few days, I met some problems relate with case sensitive. The first one is with PostgreSQL and the second one with Subversion. These problems happened on Windows, even it is not a case sensitive OS.

When I create a table (or a field) which its name is not in lower case, example: User, FirstName. PostgreSQL will create the name with double quotes (User -> "User", FirstName -> "FirstName"). When you execute "SELECT * FROM User", it will not work. The correct statement should be "SELECT * FROM "User"". Please note that User must be bound by double quotes.

The same problem happend with a Subversion repository. If you create a "BlahBlah" repository, and checkout or update with "blahblah" in URL, it works fine. But it doesn't work when you commit.

No comments: