From 7fb88ec506bca6490b4db07d1ab60308cd6675c9 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 5 Sep 2016 10:45:11 +0200 Subject: Use proper ALTER ROLE syntax Fixes #1260 See https://www.postgresql.org/docs/9.0/static/sql-alterrole.html --- lib/private/Setup/PostgreSQL.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Setup') diff --git a/lib/private/Setup/PostgreSQL.php b/lib/private/Setup/PostgreSQL.php index 3647d5bdcec..85755ea4218 100644 --- a/lib/private/Setup/PostgreSQL.php +++ b/lib/private/Setup/PostgreSQL.php @@ -143,7 +143,7 @@ class PostgreSQL extends AbstractDatabase { try { if ($this->userExists($connection)) { // change the password - $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " CREATEDB WITH PASSWORD '" . addslashes($this->dbPassword) . "'"); + $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " WITH CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); } else { // create the user $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'"); -- cgit v1.2.3