-
Bug
-
Resolution: Fixed
-
Minor
-
2.2.3
-
None
-
MOODLE_22_STABLE
-
MOODLE_23_STABLE
-
w20_
MDL-32907_m23_like -
With postgres, database logs are filling up with a significant number of the following warnings. This appears to have got worse with Moodle 2.2.2, and appears to be related to significant changes to the increased use of contexts for this release.
2012-05-09 00:09:46 WARNING: nonstandard use of
in a string literal at character 1142
2012-05-09 00:09:46 HINT: Use the escape string syntax for backslashes, e.g., E'
'.
This is the basically the same issue as MDL-27685 where the postgres ESCAPE character was changed from '\' to '|'
The cause of the warnings is due to the default value for the ESCAPE character for postgres in the function definition "public function sql_like($fieldname, $param, $casesensitive = true, $accentsensitive = true, $notlike = false, $escapechar = '\')" in file "lib/dml/pgsql_native_moodle_database.php. We are of the opinion the default escape character should be changed to '|' rather than '\' for this function as well the corresponding change for MDL-27685.