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

Fix relation.exists? with giving distinct, offset and order for joined table #36647

Merged
merged 1 commit into from
Jul 11, 2019
Merged

Fix relation.exists? with giving distinct, offset and order for joined table #36647

merged 1 commit into from
Jul 11, 2019

Conversation

giraffate
Copy link
Contributor

Summary

Fix relation.exists? with giving distinct, offset and order for joined table

The error happens in PostgreSQL when using relation.exists? with
distinct, offset and order for joined table.
However, the error does not happen if either distinct or offset is
removed. This behavior is confusing.

Fixes #36632

…or joined table

The error happens in PostgreSQL when using `relation.exists?` with
`distinct`, `offset` and `order` for joined table.
However, the error does not happen if either `distinct` or `offset` is
removed. This behavior is confusing.

Fixes #36632
@kamipo kamipo merged commit d9587fe into rails:master Jul 11, 2019
kamipo added a commit that referenced this pull request Jul 11, 2019
…_offset_and_order_in_postgresql

Fix `relation.exists?` with giving `distinct`, `offset` and `order` for joined table
kamipo added a commit that referenced this pull request Jul 11, 2019
…_offset_and_order_in_postgresql

Fix `relation.exists?` with giving `distinct`, `offset` and `order` for joined table
kamipo added a commit that referenced this pull request Jul 11, 2019
…_offset_and_order_in_postgresql

Fix `relation.exists?` with giving `distinct`, `offset` and `order` for joined table
@giraffate giraffate deleted the fix_exists_with_distinct_and_offset_and_order_in_postgresql branch July 11, 2019 00:42
JesseChavez pushed a commit to JesseChavez/rails that referenced this pull request Dec 19, 2019
…t_and_offset_and_order_in_postgresql

Fix `relation.exists?` with giving `distinct`, `offset` and `order` for joined table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The error happens when Relation#any? used with distinct() + offset() + order() for joined table in PostgreSQL
2 participants