LinkinStars commented on PR #1070:
URL: 
https://github.com/apache/incubator-answer/pull/1070#issuecomment-2295850469

   @ferrischi201  After following the question. In the PostgreSQL scenario, it 
will report an error.
   
   ```
   SELECT DISTINCT question.* FROM "question" INNER JOIN "tag_rel" ON 
question.id = tag_rel.object_id INNER JOIN "tag" ON tag.id = tag_rel.tag_id 
WHERE (((question.user_id != $1) AND (question.id NOT IN (SELECT question_id 
FROM answer WHERE user_id = $2)) AND (tag_rel.status = $3) AND "tag"."id" IN 
($4)) OR question.id IN ($5)) AND (question.show = $6 and question.status = $7) 
ORDER BY CASE WHEN question.id IN ('10010000000000005') THEN 0 ELSE 1 END, 
question.pin DESC, question.created_at DESC LIMIT 20 [1 1 1 10030000000000004 
10010000000000005 1 1] - 575.916µs
   2024-08-19 15:21:16.852 ERROR   handler/handler.go:53   code: 500, reason: 
base.database_error, message: , error: pq: for SELECT DISTINCT, ORDER BY 
expressions must appear in select list
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to