Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^3: Backslash and Underscore problem with DBI and PostgreSQL.by Zaxo (Archbishop) |
on Jun 21, 2004 at 04:50 UTC ( [id://368367]=note: print w/replies, xml ) | Need Help?? |
Yes, forcing to lowercase and testing equality is much better than pattern matching. A username is probably intended to be a unique key, so if you want case insensitive matching, you should take steps to make sure that uniqueness is enforced in a case insensitive way. A rule on insert and update should be a nice way to do that in pg. The trouble with pattern matching is that, as you found, it breaks uniqueness of a key. After Compline,
In Section
Seekers of Perl Wisdom
|
|