Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 4cf2e5d571096398142904879d1e888e557809e2 1 parent e8615ea
@stronk7 stronk7 authored
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()) {
Please sign in to comment.
Something went wrong with that request. Please try again.