summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Pg.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index 585c0884b..b31d186bb 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -100,13 +100,25 @@ sub sql_group_concat {
return "array_to_string(array_accum($text), $separator)";
}
+sub sql_istring {
+ my ($self, $string) = @_;
+
+ return "LOWER(${string}::text)";
+}
+
+sub sql_position {
+ my ($self, $fragment, $text) = @_;
+
+ return "POSITION($fragment IN ${text}::text)";
+}
+
sub sql_regexp {
my ($self, $expr, $pattern, $nocheck, $real_pattern) = @_;
$real_pattern ||= $pattern;
$self->bz_check_regexp($real_pattern) if !$nocheck;
- return "$expr ~* $pattern";
+ return "${expr}::text ~* $pattern";
}
sub sql_not_regexp {
@@ -115,7 +127,7 @@ sub sql_not_regexp {
$self->bz_check_regexp($real_pattern) if !$nocheck;
- return "$expr !~* $pattern"
+ return "${expr}::text !~* $pattern"
}
sub sql_limit {