in reply to Re^2: Backslash and Underscore problem with DBI and PostgreSQL.
in thread Backslash and Underscore problem with DBI and PostgreSQL.
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,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Backslash and Underscore problem with DBI and PostgreSQL.
by Seumas (Curate) on Jun 21, 2004 at 05:04 UTC |