Nextcloud 10.0.1 Bug in PostgreSQL Setup Fixed


Installing Nextcloud 10.0.1 on PostgreSQL there is an error in the PG
syntax. I had to remove the “CREATEDB” and late execute this command
manually via the pgsql command line:

alter role oc_fraber with password ‘xxx’;
grant ALL ON schema public to oc_fraber;
grant CONNECT ON DATABASE nextcloud TO oc_fraber;

Please include this in the installer…


Twitter: @projop

[root@kassel2 Setup]# diff -w PostgreSQL.php PostgreSQL.php~
< $query = $connection->prepare(“ALTER ROLE " . addslashes($this->dbUser) . " WITH PASSWORD '” . addslashes($this->dbPassword) . “’”);

                          $query = $connection->prepare("ALTER ROLE " . addslashes($this->dbUser) . " CREATEDB WITH PASSWORD '" . addslashes($this->dbPassword) . "'");

< $query = $connection->prepare(“CREATE USER " . addslashes($this->dbUser) . " WITH PASSWORD '” . addslashes($this->dbPassword) . “’”);

                          $query = $connection->prepare("CREATE USER " . addslashes($this->dbUser) . " CREATEDB PASSWORD '" . addslashes($this->dbPassword) . "'");

Thanks for your input. For bugs in the code and their fix, it is the best to create a pull request to the server-repository on This way your changes are automatically tested and developers can review your changes.

Man, very true. However, I already had a similar bug more than 6 months ago. So just please get down to fixing your issue, otherwise your career will be over soon.


A pull request would solve this very quickly. It’s a community project, it is better to submit your contributions yourself in case there are questions or remarks.

I don’t see how my career is linked with your issue.