Skip to content

Conversation

shugo
Copy link
Contributor

@shugo shugo commented Feb 10, 2022

Summary

Functions in the argument of ORDER BY is allowed now (#36448).
COLLATE should also be allowed.

Post.order('title COLLATE "C"')

Other Information

It seems that PostgreSQL requires quotes for collation names while MySQL and SQLite doesn't.

Copy link
Member

@byroot byroot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, can you add a CHANGELOG entry please?

@shugo shugo force-pushed the order_with_collate branch from 957d31f to d12e4da Compare February 12, 2022 11:54
@shugo
Copy link
Contributor Author

shugo commented Feb 12, 2022

@byroot
Thanks for your review.
I've added a CHANGELOG entry.

@byroot byroot merged commit 269948f into rails:main Feb 12, 2022
@shugo shugo deleted the order_with_collate branch February 12, 2022 12:35
aidanharan added a commit to rails-sqlserver/activerecord-sqlserver-adapter that referenced this pull request Sep 13, 2023
aidanharan added a commit to rails-sqlserver/activerecord-sqlserver-adapter that referenced this pull request Sep 14, 2023
lavika pushed a commit to lavika/activerecord-sqlserver-adapter that referenced this pull request Sep 26, 2023
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.

2 participants