-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update broken on PGSQL #5909
Comments
psql (PostgreSQL) 9.6.3 (latest Debian stable) |
No clue why the query builder is fucking up the query
|
This is $computedPath at https://github.com/nextcloud/server/blob/stable12/lib/private/Repair/NC13/RepairInvalidPaths.php#L57
That query won't work, you will need to expand it. |
|
The error is the missing parentheses |
return new QueryFunction($this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y)); should be return new QueryFunction('(' . $this->helper->quoteColumnName($x) . ' || ' . $this->helper->quoteColumnName($y) . ')'); No idea why you overwrite this method because postgres has CONCAT(). Also I have no idea why you are not reusing doctrine's query builder |
A little bit off topic here, but I wish PostgreSQL in general was better supported. In MariaDB/MySQL you have to mess around with UTF8mb4 if you want 4-byte support, which is default in PostgreSQL UTF8. PostgreSQL feels like a better DB in general. Would be nice if Nextcloud decided to go down that path instead of recommending a less advanced (and IMHO) worse DB. I'm writing this after I have been messing with MariaDB for hours to activate 4 byte support, which only took a few minutes in PostgreSQL (aka I think it was @MorrisJobke that said that MariaDB/MySQL was tested in a larger (EDIT: clustered enviroments, nextcloud/vm#277 (comment)) environment and proved to be better, but my guess is that that test was some time ago. Maybe you should consider making PostgreSQL the recomended DB after all? Also, this is not just about UTF8mb4, I'm talking generally. There are a lot to gain in using PSQL any other DB IMHO. According to several hours of reading I did comparing and testing the alternatives. |
Hi @enoch85 Please use a new topic ;) short answer: I think postgres and mysql are both equally well supported and there is no bias. |
We are, just have 2 manipulations in it:
However that doctrine query builder has no "FunctionBuilder" like we have, so we are not overwriting a doctrine method with some wrong. Also as per https://www.postgresql.org/docs/9.1/static/functions-string.html But thanks for finding the issue and feel free to send a PR? ;) |
From @BernhardPosselt on IRC:
@icewind1991 This seems like your repair step. Can you look into this? This is blocking 12.0.1. THX!
The text was updated successfully, but these errors were encountered: