Skip to content
Browse files

MDL-25749 dml - pgsql fix for integer-exclusive concats

  • Loading branch information...
1 parent e8615ea commit 4cf2e5d571096398142904879d1e888e557809e2 @stronk7 stronk7 committed Dec 22, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/dml/pgsql_native_moodle_database.php
View
4 lib/dml/pgsql_native_moodle_database.php
@@ -1115,7 +1115,9 @@ public function sql_concat() {
if ($s === '') {
return " '' ";
}
- return " $s ";
+ // Add always empty string element so integer-exclusive concats
+ // will work without needing to cast each element explicity
+ return " '' || $s ";
}
public function sql_concat_join($separator="' '", $elements=array()) {

0 comments on commit 4cf2e5d

Please sign in to comment.
Something went wrong with that request. Please try again.