1

Topic: Postgres is case sensitive and registratation

If you use postgres a user may currently have registered a user kalle but a new user may still register the user Kalle since postgres is case sensitive. This will cause login problems.

I changed the code to use ILIKE instead of = below the comment "Check that the username (or a too similar username) is not already" at line 128 in register.php.

Are there any other problems that may surface since postgres is case sensitive? Maybe we could solve those at the same time?

Ulf

2 (edited by Ulph 2005-04-16 23:16)

Re: Postgres is case sensitive and registratation

OK, another issue is that the userlist is sorted case sensitive in postgres whereas it is sorted case insensitive with mysql. But that's just kind of annoying.

It can be solved by using a new key in the query that you order by, for example

UPPER(u.username) AS usernamekey

Is there a better way?

Re: Postgres is case sensitive and registratation

I'll have a look at it. Thanks.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Postgres is case sensitive and registratation

Fixed the register bug. I'll wait with the userlist annoyance. I'm not sure what running UPPER on all usernames will do for performance.

"Programming is like sex: one mistake and you have to support it for the rest of your life."