aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/kindle
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-12-20 05:09:49 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-12-20 06:41:10 +0900
commitc6cd9a59f200863ccfe8ad1d9c5a8876c39b9c5c (patch)
tree2fbbd9af309f7e01c43a6571744d824ad1f8ae97 /guides/source/kindle
parenteb6baccda26d65c70d0e2df28c6cd51ec3cdb2ac (diff)
downloadrails-c6cd9a59f200863ccfe8ad1d9c5a8876c39b9c5c.tar.gz
rails-c6cd9a59f200863ccfe8ad1d9c5a8876c39b9c5c.tar.bz2
rails-c6cd9a59f200863ccfe8ad1d9c5a8876c39b9c5c.zip
Fix `count(:all)` to correctly work `distinct` with custom SELECT list
Currently `count(:all)` with `distinct` doesn't work correctly because SELECT list is always replaced to `*` or primary key in that case even if having custom SELECT list. And also, PostgreSQL has a limitation that ORDER BY expressions must appear in select list for SELECT DISTINCT. Therefore, we should not replace custom SELECT list when using `count(:all)` with `distinct`. Closes #31277.
Diffstat (limited to 'guides/source/kindle')
0 files changed, 0 insertions, 0 deletions