• R
    PostgreSQL: Fix GROUP BY with ORDER BY virtual count attribute · cb0299c9
    Ryuta Kamizono 提交于
    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 311f0011).
    
    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 311f0011) to fix the regression #36022.
    
    Fixes #36022.
    cb0299c9
calculations_test.rb 34.3 KB