From: Max Kanat-Alexander Date: Thu, 8 Jul 2010 22:57:21 +0000 (-0700) Subject: Bug 577569: [PostgreSQL] Make sql_position explicitly cast both its arguments X-Git-Tag: bugzilla-4.1.1~444 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e756dd204328d22836054cbc726a53ca222faa8;p=thirdparty%2Fbugzilla.git Bug 577569: [PostgreSQL] Make sql_position explicitly cast both its arguments to text, to avoid an error when searching "longdescs.isprivate" with the "casesubstring" operator in Search.pm. r=mkanat, a=mkanat (module owner) --- diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 0189001299..7aaafd88f3 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -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 {