]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 577569: [PostgreSQL] Make sql_position explicitly cast both its arguments
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Thu, 8 Jul 2010 22:57:21 +0000 (15:57 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Thu, 8 Jul 2010 22:57:21 +0000 (15:57 -0700)
to text, to avoid an error when searching "longdescs.isprivate" with the
"casesubstring" operator in Search.pm.
r=mkanat, a=mkanat (module owner)

Bugzilla/DB/Pg.pm

index 0189001299a41f921acd4a35bc065b0fb7db517c..7aaafd88f32da89399249b98e7430e657e02e1f7 100644 (file)
@@ -117,7 +117,7 @@ sub sql_istring {
 sub sql_position {
     my ($self, $fragment, $text) = @_;
 
-    return "POSITION($fragment IN ${text}::text)";
+    return "POSITION(${fragment}::text IN ${text}::text)";
 }
 
 sub sql_regexp {