-
Notifications
You must be signed in to change notification settings - Fork 12
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
Error: multiple ORDER BY clauses not allowed #128
Comments
Making this change has gotten me going again: diff --git a/src/local/model_postgres.coffee b/src/local/model_postgres.coffee
index e7f0b78..7a2cb1e 100644
--- a/src/local/model_postgres.coffee
+++ b/src/local/model_postgres.coffee
@@ -612,7 +612,7 @@ class Transaction
prepArgs.push node
prepArgs.push timeStart
prepArgs.push maxItems
- q += " ORDER BY updated DESC"
+ q += " ORDER BY updated DESC" if res?.rows?.length > 1
db.query q, prepArgs, cb2
, (res, cb2) ->
items = res?.rows.map (row) -> But I don't know if that will actually behave correctly when there are multiple rows. |
What version of PostgreSQL are you using? Could you please try reverting dbcc73a and check if it works? |
I tried reverting dbcc73a and that also seems to work. I found out that my server was in an inconsistent state when I first encountered this error. I set up buddycloud under a preexisting Prosody server; so I was able to log in but my user account had not been initialized in the database. Maybe that was the cause of the problem? |
I doubt it: I did the same when first installing buddycloud, and it's really a supported and "normal" use case. What version of PostgreSQL are you using? I don't have this issue on 9.2, but maybe this behaves differently on other versions. |
Postgres 9.1.9-1ubuntu1 I'm sorry for neglecting to include that detail before.
|
My server was working nicely for a while. But then I started seeing these Postgres errors when making /sync queries:
Here is the request URL:
The text was updated successfully, but these errors were encountered: