[open-ils-commits] r9145 - trunk/Open-ILS/src/sql/Pg
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 27 01:09:23 EDT 2008
Author: miker
Date: 2008-03-27 00:33:59 -0400 (Thu, 27 Mar 2008)
New Revision: 9145
Modified:
trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
Log:
use POSIX regexp operator instead of ILIKE
Modified: trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql 2008-03-27 04:17:10 UTC (rev 9144)
+++ trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql 2008-03-27 04:33:59 UTC (rev 9145)
@@ -220,7 +220,7 @@
tmp_text := replace( tmp_text, '[', E'\\[' );
tmp_text := replace( tmp_text, ']', E'\\]' );
- inner_where_clause := inner_where_clause || ' AND ' || 'value ILIKE ' || quote_literal( E'(^|\\W+)' || regexp_replace(tmp_text, E'\\s+',E'\\\\s+','g') || E'(\\W+|\$)' );
+ inner_where_clause := inner_where_clause || ' AND ' || 'value ~* ' || quote_literal( E'(^|\\W+)' || regexp_replace(tmp_text, E'\\s+',E'\\\\s+','g') || E'(\\W+|\$)' );
END LOOP;
@@ -335,7 +335,7 @@
core_rel_query := select_clause || from_clause || where_clause ||
' GROUP BY 1 ORDER BY 4' || CASE WHEN sort_desc THEN ' DESC' ELSE ' ASC' END || ';';
- --RAISE NOTICE 'Base Query: %', core_rel_query;
+ RAISE NOTICE 'Base Query: %', core_rel_query;
IF param_depth IS NOT NULL THEN
SELECT array_accum(distinct id) INTO search_org_list FROM actor.org_unit_descendants( param_search_ou, param_depth );
More information about the open-ils-commits
mailing list