Fix `test_apply_distinct_in_count` failure in PG adapter
Fix `test_apply_distinct_in_count` failure in PG adapter

```
% ARCONN=postgresql be ruby -w -Itest test/cases/calculations_test.rb -n test_apply_distinct_in_count
/Users/kamipo/src/github.com/rails/rails/activesupport/lib/active_support/core_ext/enumerable.rb:20: warning: method redefined; discarding old sum
Using postgresql
Run options: -n test_apply_distinct_in_count --seed 27731

F

Finished in 0.163682s, 6.1094 runs/s, 30.5470 assertions/s.

  1) Failure:
CalculationsTest#test_apply_distinct_in_count [test/cases/calculations_test.rb:238]:
Expected /\ASELECT(?! DISTINCT) COUNT\(DISTINCT\b/ to match "SHOW max_identifier_length".

1 runs, 5 assertions, 1 failures, 0 errors, 0 skips
```

https://travis-ci.org/rails/rails/jobs/205493811#L1933
https://travis-ci.org/rails/rails/jobs/205496299#L1562
https://travis-ci.org/rails/rails/jobs/205514765#L1562

tgxworld/rails,kirs/rails-1,kmayer/rails,ledestin/rails,yasslab/railsguides.jp,tgxworld/rails,rossta/rails,gfvcastro/rails,shioyama/rails,betesh/rails,riseshia/railsguides.kr,matrinox/rails,mathieujobin/reduced-rails-for-travis,utilum/rails,bogdanvlviv/rails,kamipo/rails,notapatch/rails,deraru/rails,eileencodes/rails,yawboakye/rails,ttanimichi/rails,gcourtemanche/rails,illacceptanything/illacceptanything,kmcphillips/rails,mechanicles/rails,untidy-hair/rails,bradleypriest/rails,MSP-Greg/rails,tgxworld/rails,mtsmfm/railstest,fabianoleittes/rails,schuetzm/rails,fabianoleittes/rails,kaspth/rails,kaspth/rails,baerjam/rails,printercu/rails,lucasmazza/rails,pvalena/rails,maicher/rails,yalab/rails,Envek/rails,notapatch/rails,Stellenticket/rails,assain/rails,riseshia/railsguides.kr,rafaelfranca/omg-rails,vipulnsward/rails,palkan/rails,kamipo/rails,mijoharas/rails,Erol/rails,joonyou/rails,assain/rails,Envek/rails,mechanicles/rails,kmcphillips/rails,travisofthenorth/rails,lcreid/rails,palkan/rails,pschambacher/rails,Vasfed/rails,illacceptanything/illacceptanything,Stellenticket/rails,travisofthenorth/rails,odedniv/rails,yalab/rails,flanger001/rails,kamipo/rails,illacceptanything/illacceptanything,yawboakye/rails,utilum/rails,vipulnsward/rails,Vasfed/rails,schuetzm/rails,tgxworld/rails,mathieujobin/reduced-rails-for-travis,rafaelfranca/omg-rails,aditya-kapoor/rails,odedniv/rails,rails/rails,palkan/rails,bogdanvlviv/rails,riseshia/railsguides.kr,Edouard-chin/rails,mechanicles/rails,printercu/rails,ttanimichi/rails,baerjam/rails,ngpestelos/rails,BlakeWilliams/rails,rails/rails,maicher/rails,pvalena/rails,mohitnatoo/rails,kirs/rails-1,gcourtemanche/rails,iainbeeston/rails,koic/rails,prathamesh-sonpatki/rails,riseshia/railsguides.kr,Edouard-chin/rails,alecspopa/rails,lucasmazza/rails,koic/rails,Spin42/rails,Sen-Zhang/rails,illacceptanything/illacceptanything,prathamesh-sonpatki/rails,shioyama/rails,tjschuck/rails,yhirano55/rails,starknx/rails,arunagw/rails,repinel/rails,illacceptanything/illacceptanything,felipecvo/rails,MSP-Greg/rails,flanger001/rails,joonyou/rails,starknx/rails,georgeclaghorn/rails,untidy-hair/rails,shioyama/rails,mohitnatoo/rails,EmmaB/rails-1,kmcphillips/rails,yalab/rails,gauravtiwari/rails,jeremy/rails,betesh/rails,bogdanvlviv/rails,rossta/rails,arunagw/rails,mohitnatoo/rails,Spin42/rails,samphilipd/rails,gfvcastro/rails,illacceptanything/illacceptanything,gauravtiwari/rails,arunagw/rails,kddeisz/rails,xlymian/rails,jeremy/rails,repinel/rails,hanystudy/rails,rails/rails,illacceptanything/illacceptanything,odedniv/rails,assain/rails,yhirano55/rails,MSP-Greg/rails,arunagw/rails,Sen-Zhang/rails,illacceptanything/illacceptanything,betesh/rails,joonyou/rails,BlakeWilliams/rails,pschambacher/rails,iainbeeston/rails,felipecvo/rails,deraru/rails,MSP-Greg/rails,vipulnsward/rails,xlymian/rails,georgeclaghorn/rails,flanger001/rails,brchristian/rails,yhirano55/rails,alecspopa/rails,kddeisz/rails,gauravtiwari/rails,kmcphillips/rails,matrinox/rails,yalab/rails,Vasfed/rails,palkan/rails,rossta/rails,shioyama/rails,illacceptanything/illacceptanything,kmayer/rails,schuetzm/rails,iainbeeston/rails,yahonda/rails,esparta/rails,notapatch/rails,lcreid/rails,kddeisz/rails,illacceptanything/illacceptanything,yhirano55/rails,kddeisz/rails,hanystudy/rails,georgeclaghorn/rails,marklocklear/rails,Sen-Zhang/rails,koic/rails,brchristian/rails,notapatch/rails,prathamesh-sonpatki/rails,esparta/rails,aditya-kapoor/rails,yasslab/railsguides.jp,kirs/rails-1,prathamesh-sonpatki/rails,Vasfed/rails,printercu/rails,iainbeeston/rails,esparta/rails,bradleypriest/rails,tjschuck/rails,jeremy/rails,illacceptanything/illacceptanything,kaspth/rails,illacceptanything/illacceptanything,schuetzm/rails,yahonda/rails,utilum/rails,repinel/rails,baerjam/rails,flanger001/rails,gcourtemanche/rails,pvalena/rails,illacceptanything/illacceptanything,ledestin/rails,Stellenticket/rails,eileencodes/rails,illacceptanything/illacceptanything,marklocklear/rails,eileencodes/rails,fabianoleittes/rails,mathieujobin/reduced-rails-for-travis,esparta/rails,pvalena/rails,gfvcastro/rails,brchristian/rails,Spin42/rails,betesh/rails,illacceptanything/illacceptanything,untidy-hair/rails,assain/rails,gfvcastro/rails,aditya-kapoor/rails,EmmaB/rails-1,Erol/rails,bradleypriest/rails,baerjam/rails,vipulnsward/rails,EmmaB/rails-1,utilum/rails,mtsmfm/railstest,rafaelfranca/omg-rails,tjschuck/rails,ledestin/rails,Erol/rails,ttanimichi/rails,yawboakye/rails,travisofthenorth/rails,Envek/rails,Edouard-chin/rails,untidy-hair/rails,ngpestelos/rails,hanystudy/rails,fabianoleittes/rails,rails/rails,repinel/rails,Erol/rails,BlakeWilliams/rails,xlymian/rails,deraru/rails,mijoharas/rails,deraru/rails,mechanicles/rails,marklocklear/rails,ngpestelos/rails,felipecvo/rails,eileencodes/rails,aditya-kapoor/rails,mtsmfm/railstest,lcreid/rails,yasslab/railsguides.jp,travisofthenorth/rails,lucasmazza/rails,Stellenticket/rails,tjschuck/rails,samphilipd/rails,mohitnatoo/rails,maicher/rails,yawboakye/rails,georgeclaghorn/rails,Edouard-chin/rails,starknx/rails,yahonda/rails,BlakeWilliams/rails,samphilipd/rails,alecspopa/rails,jeremy/rails,kmayer/rails,Envek/rails,bogdanvlviv/rails,lcreid/rails,mijoharas/rails,matrinox/rails,yasslab/railsguides.jp,yahonda/rails,printercu/rails,joonyou/rails,pschambacher/rails