[Jifty-commit] r2186 - in Jifty-DBI/trunk: lib/Jifty/DBI/Handle
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Nov 21 13:53:58 EST 2006
Author: jesse
Date: Tue Nov 21 13:53:58 2006
New Revision: 2186
Modified:
Jifty-DBI/trunk/ (props changed)
Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm
Log:
r45243 at pinglin: jesse | 2006-11-21 12:47:21 -0500
* Postgres can't use an index on ILIKE, so we'll back off to a more traditional LOWER(x) LIKE LOWER(y) solution.
Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm (original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle/Pg.pm Tue Nov 21 13:53:58 2006
@@ -172,9 +172,7 @@
my $value = shift;
if ($self->_case_insensitivity_valid($column, $operator, $value)) {
- if ( $operator =~ /LIKE/i ) {
- $operator =~ s/LIKE/ILIKE/ig;
- } elsif ( $operator =~ /=/ ) {
+ if ( $operator =~ /(?:LIKE|=)/ ) {
$column = "LOWER($column)";
$value = "LOWER($value)";
}
More information about the Jifty-commit
mailing list