From cb0299c9eba6463085130debda6347abf9683463 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Mon, 17 Jun 2019 21:49:28 +0900 Subject: PostgreSQL: Fix GROUP BY with ORDER BY virtual count attribute GROUP BY with virtual count attribute is invalid for almost all databases, but it is valid for PostgreSQL, and it had worked until Rails 5.2.2, so it is a regression for Rails 5.2.3 (caused by 311f001). I can't find perfectly solution for fixing this for now, but I would not like to break existing apps, so I decided to allow referencing virtual count attribute in ORDER BY clause when GROUP BY aggrigation (it partly revert the effect of 311f001) to fix the regression #36022. Fixes #36022. --- activerecord/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activerecord/CHANGELOG.md') diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 565d5c58b4..8d4b01e995 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,9 @@ +* PostgreSQL: Fix GROUP BY with ORDER BY virtual count attribute. + + Fixes #36022. + + *Ryuta Kamizono* + * Make ActiveRecord `ConnectionPool.connections` method thread-safe. Fixes #36465. -- cgit v1.2.3