[open-ils-commits] r12329 - branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Feb 28 20:03:04 EST 2009
Author: dbs
Date: 2009-02-28 20:03:03 -0500 (Sat, 28 Feb 2009)
New Revision: 12329
Modified:
branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
Backport r12187 from trunk: Cast LOWER arguments explicitly to text to deal with LOWER(id) - throws an exception on PostgreSQL 8.3
Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-03-01 00:39:25 UTC (rev 12328)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-03-01 01:03:03 UTC (rev 12329)
@@ -461,10 +461,10 @@
# group 1 = address
# group 2 = phone, ident
- my $usr = join ' AND ', map { "LOWER($_) ~ ?" } grep { ''.$$search{$_}{group} eq '0' } keys %$search;
+ my $usr = join ' AND ', map { "LOWER(CAST($_ AS text)) ~ ?" } grep { ''.$$search{$_}{group} eq '0' } keys %$search;
my @usrv = map { "^$$search{$_}{value}" } grep { ''.$$search{$_}{group} eq '0' } keys %$search;
- my $addr = join ' AND ', map { "LOWER($_) ~ ?" } grep { ''.$$search{$_}{group} eq '1' } keys %$search;
+ my $addr = join ' AND ', map { "LOWER(CAST($_ AS text)) ~ ?" } grep { ''.$$search{$_}{group} eq '1' } keys %$search;
my @addrv = map { "^$$search{$_}{value}" } grep { ''.$$search{$_}{group} eq '1' } keys %$search;
my $pv = $$search{phone}{value};
@@ -533,8 +533,8 @@
return undef;
}
- my $order_by = join ', ', map { 'LOWER(users.'. (split / /,$_)[0] . ') ' . (split / /,$_)[1] } @$sort;
- my $distinct_list = join ', ', map { 'LOWER(users.'. (split / /,$_)[0] . ')' } @$sort;
+ my $order_by = join ', ', map { 'LOWER(CAST(users.'. (split / /,$_)[0] . ' AS text)) ' . (split / /,$_)[1] } @$sort;
+ my $distinct_list = join ', ', map { 'LOWER(CAST(users.'. (split / /,$_)[0] . ' AS text))' } @$sort;
if ($inactive) {
$inactive = '';
More information about the open-ils-commits
mailing list