From 635b7f6bdfd5078ead2386950091f8b1e6558ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Wed, 22 Oct 2025 16:20:17 +0200 Subject: [PATCH] MDL-81804 dml: Passing parameters with -c key=val on PostgreSQL. Co-authored-by: Marcos Dos Santos De Oliveira --- lib/dml/pgsql_native_moodle_database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dml/pgsql_native_moodle_database.php b/lib/dml/pgsql_native_moodle_database.php index 13844654d96..1c76c5c2cf0 100644 --- a/lib/dml/pgsql_native_moodle_database.php +++ b/lib/dml/pgsql_native_moodle_database.php @@ -187,7 +187,7 @@ class pgsql_native_moodle_database extends moodle_database { if (empty($this->dboptions['dbhandlesoptions'])) { // ALTER USER and ALTER DATABASE are overridden by these settings. - $options = array('--client_encoding=utf8', '--standard_conforming_strings=on'); + $options = ['-c client_encoding=utf8', '-c standard_conforming_strings=on']; // Select schema if specified, otherwise the first one wins. if (!empty($this->dboptions['dbschema'])) { $options[] = "-c search_path=" . addcslashes($this->dboptions['dbschema'], "'\\");