[open-ils-commits] r18133 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Sat Oct 2 02:04:09 EDT 2010


Author: miker
Date: 2010-10-02 02:04:05 -0400 (Sat, 02 Oct 2010)
New Revision: 18133

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Log:
putting back the NUMERIC cast, it is needed

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm	2010-10-02 05:47:02 UTC (rev 18132)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm	2010-10-02 06:04:05 UTC (rev 18133)
@@ -423,6 +423,7 @@
         my $plw = $filters{preferred_language_multiplier} ? $filters{preferred_language_multiplier} : $self->QueryParser->default_preferred_language_multiplier;
         $rel = "($rel * COALESCE( NULLIF( FIRST(mrd.item_lang) = $pl , FALSE )::INT * $plw, 1))";
     }
+    $rel .= '::NUMERIC';
 
     for my $f ( qw/audience vr_format item_type item_form lit_form language bib_level/ ) {
         my $col = $f;
@@ -457,7 +458,7 @@
         if ($sort_filter eq 'title') {
             $rank = "FIRST((SELECT frt.value FROM metabib.full_rec frt WHERE frt.record = m.source AND frt.tag = 'tnf' AND frt.subfield = 'a' LIMIT 1))";
         } elsif ($sort_filter eq 'pubdate') {
-            $rank = "FIRST(mrd.date1)";
+            $rank = "FIRST(mrd.date1)::NUMERIC";
         } elsif ($sort_filter eq 'create_date') {
             $rank = "FIRST((SELECT create_date FROM biblio.record_entry rbr WHERE rbr.id = m.source))";
         } elsif ($sort_filter eq 'edit_date') {



More information about the open-ils-commits mailing list