Fixed #columns_for_distinct of postgresql adapter

Please look at this PR Fixed #columns_for_distinct of postgresql adapter by nkondratyev · Pull Request #11896 · rails/rails · GitHub