From 3bcaea86800063ad31e18327cc3c380cd1e7dd6e Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 27 Mar 2008 04:33:59 +0000 Subject: [PATCH 1/1] use POSIX regexp operator instead of ILIKE git-svn-id: svn://svn.open-ils.org/ILS/trunk@9145 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/300.schema.staged_search.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql index 39e52e7dfd..ea042d4b15 100644 --- a/Open-ILS/src/sql/Pg/300.schema.staged_search.sql +++ b/Open-ILS/src/sql/Pg/300.schema.staged_search.sql @@ -220,7 +220,7 @@ BEGIN 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 @@ BEGIN 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 ); -- 2.43.2