[open-ils-commits] r12187 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Feb 15 13:53:59 EST 2009
Author: dbs
Date: 2009-02-15 13:53:56 -0500 (Sun, 15 Feb 2009)
New Revision: 12187
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
Log:
Cast LOWER arguments explicitly to text to deal with LOWER(id) - throws an exception on PostgreSQL 8.3
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-02-15 16:58:57 UTC (rev 12186)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/actor.pm 2009-02-15 18:53:56 UTC (rev 12187)
@@ -484,10 +484,10 @@
# group 2 = phone, ident
# group 3 = barcode
- 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};
@@ -563,8 +563,8 @@
return undef if (!$select && !$card);
- 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