Skip to content

Commit

Permalink
MDL-81804 dml: Passing parameters with -c key=val on PostgreSQL.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiescmarcos authored and lucaboesch committed Jan 31, 2025
1 parent 1c7ac70 commit 2d83582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/dml/pgsql_native_moodle_database.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function raw_connect(string $dbhost, string $dbuser, string $dbpass, stri

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'], "'\\");
Expand Down

0 comments on commit 2d83582

Please sign in to comment.