-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Using :group with #count generating bad SQL on Postgres #5588
Comments
I've added a basic failing test here: ahawkins@0ba4234 I will work on it more later. |
Is this still broken ? Are you able to reproduce it in master ? |
@twinturbo ur basic failing test link are out of date -> ahawkins@0ba4234 are there anyway to look at them? i'll happly write a patch for it :) thx |
Is this still a problem with |
This issue has been open for a loooong time, and it seems we don't have a reproduction. I'm giving it a close. @ahawkins, if you want to keep up with this, you know what to do ❤️ |
Rails 4.0.0, Ruby 2.0
results in this Postgres exception:
PostgreSQL 9.2 and 9.1.5 |
Thanks! Sorry I missed this. |
This ticket should really be split - I'm not 100% sure the original problem is even a bug (probably should be using Related tickets (after a little digging):
|
Can't reproduce this with following gist https://gist.github.com/iantropov/7394625 |
@iantropov : Yes, it looks like most of the issues quoted by @al2o3cr are resolved. Also the gist you provided is passing on my machine (with 4.0.0 and master) ; I first thought this was PostgreSQL specific but it passes as well with the pg adapter. I'm going to give it a close. @yawboakye : If you can provide en executable gist that reproduce the problem, let us know and we can reopen. Thank you! |
Here is a call to
scoped
:Here it the error:
Here is the query formatted nicely:
TL;DR: rails adds
HAVING COUNT
to the select clause and postgres blows up.The text was updated successfully, but these errors were encountered: