diff options
author | mkanat%kerio.com <> | 2005-03-17 15:54:05 +0100 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-03-17 15:54:05 +0100 |
commit | 8bb3cb2ac9f523b9f840b26624a74bd4e8c81de2 (patch) | |
tree | ae7d69e03c184c3a76c14762db9dd57380628351 /Bugzilla | |
parent | 27767372c1a166b09b77a9bdb6c482837db3d489 (diff) | |
download | bugzilla-8bb3cb2ac9f523b9f840b26624a74bd4e8c81de2.tar.gz bugzilla-8bb3cb2ac9f523b9f840b26624a74bd4e8c81de2.tar.xz |
Bug 286392: String concatenation on postgres does not always work
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/DB.pm | 2 | ||||
-rw-r--r-- | Bugzilla/DB/Pg.pm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm index 0d41bbd01..1c2bcbf99 100644 --- a/Bugzilla/DB.pm +++ b/Bugzilla/DB.pm @@ -225,7 +225,7 @@ sub sql_group_by { sub sql_string_concat { my ($self, @params) = @_; - return join(' || ', @params); + return '(' . join(' || ', @params) . ')'; } sub sql_fulltext_search { diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm index de3260e7a..be921f4d1 100644 --- a/Bugzilla/DB/Pg.pm +++ b/Bugzilla/DB/Pg.pm @@ -137,7 +137,7 @@ sub sql_string_concat { # 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. - return 'CAST(' . join(' AS text) || CAST(', @params) . ' AS text)'; + return '(CAST(' . join(' AS text) || CAST(', @params) . ' AS text))'; } sub bz_lock_tables { |