Skip to content
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

I got postgress error - No function matches the given name and argument types.... #101

Closed
gudata opened this issue Oct 16, 2014 · 3 comments

Comments

@gudata
Copy link

gudata commented Oct 16, 2014

When using select in sql I got an error

@new_charities = Charity.select(:id, :name, :slug).published.where('created_at >= :since_date', since_date: since_date)

when I remove the select there is no error

@new_charities = Charity.published.where('created_at >= :since_date', since_date: since_date)

here is a stack trace

https://gist.github.com/gudata/da2c5ce57ffd776179c6

I have tried with master and the latest released gem.

@SamSaffron
Copy link
Member

The SQL running is super weird:

SELECT COUNT(id, name, slug) 

Are you sure this is working without miniprofiler?

@gudata
Copy link
Author

gudata commented Jun 8, 2016

Correct, the generated sql query is wrong.

@gudata gudata closed this as completed Jun 8, 2016
@kbrock
Copy link
Contributor

kbrock commented Jun 8, 2016

@gudata as a followup, I've been converting most of my Model.count code over to Model.count(:all)
For us, the non-argument version is just too temperamental.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants