From 2e756dd204328d22836054cbc726a53ca222faa8 Mon Sep 17 00:00:00 2001 From: Max Kanat-Alexander Date: Thu, 8 Jul 2010 15:57:21 -0700 Subject: 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) --- Bugzilla/DB/Pg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Bugzilla/DB/Pg.pm') diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 018900129..7aaafd88f 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 { -- cgit v1.2.3-24-g4f1b