From: Frédéric Buclin Date: Fri, 23 Jan 2015 11:07:34 +0000 (+0100) Subject: Bug 493027: Update the comment in DB::Pg::sql_string_concat() X-Git-Tag: release-5.1.1~382 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db8c5141a90a910dca5600ba094b6f7d04b749bf;p=thirdparty%2Fbugzilla.git Bug 493027: Update the comment in DB::Pg::sql_string_concat() r=gerv a=glob --- diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index 4ec95725de..59231e2a6e 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -187,10 +187,9 @@ sub sql_date_math { sub sql_string_concat { my ($self, @params) = @_; - - # Postgres 7.3 does not support concatenating of different types, so we - # need to cast both parameters to text. Version 7.4 seems to handle this - # properly, so when we stop support 7.3, this can be removed. + + # PostgreSQL 8.3 and newer require an explicit coercion to text + # to support concatenation of different data types. return '(CAST(' . join(' AS text) || CAST(', @params) . ' AS text))'; }