diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-11-07 00:27:50 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-11-09 18:47:39 +0900 |
commit | 2bf7c30049558c2503f20e9810fdf4727650fe99 (patch) | |
tree | 27f7aebb843c001060d6d1b39bd97d443f23ef43 /Gemfile | |
parent | 1b16e4c348055e9e7909e59e47dbe346b149ba52 (diff) | |
download | rails-2bf7c30049558c2503f20e9810fdf4727650fe99.tar.gz rails-2bf7c30049558c2503f20e9810fdf4727650fe99.tar.bz2 rails-2bf7c30049558c2503f20e9810fdf4727650fe99.zip |
Should except `:distinct` rather than `:order` for `exists?`
Records fetching order is very important for performance if `limit` is
presented. Should not except the order in the case.
And `exists?` replaces select list to `1 AS one` therefore `:distinct`
is useless (`DISTINCT 1 AS one`). And PostgreSQL raises the following
error if `:distinct` and `:order` are used in the same time.
```
ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
```
Diffstat (limited to 'Gemfile')
0 files changed, 0 insertions, 0 deletions