aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2017-03-14 18:53:42 +1030
committerMatthew Draper <matthew@trebex.net>2017-03-14 18:53:42 +1030
commit29709cd3f3b997015071bbe9336744b5673bc587 (patch)
tree4715d08c59339588bcba9e9440ee128d62fe07d3 /activerecord
parent42f676d10bcb72d2f8b88f984f0764ab09484b69 (diff)
downloadrails-29709cd3f3b997015071bbe9336744b5673bc587.tar.gz
rails-29709cd3f3b997015071bbe9336744b5673bc587.tar.bz2
rails-29709cd3f3b997015071bbe9336744b5673bc587.zip
Revert "Merge pull request #28369 from mylake/reduce-postgresql-adapter-memory-bloat"
This reverts commit 192db64452d148c7b51713979459e38407380dc6, reversing changes made to 9893955363cf6358556ed3b36f4538d5b54e9d17. We can't sacrifice correctness for performance.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 9f419f909f..22c37abb78 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -568,13 +568,13 @@ module ActiveRecord
if supports_ranges?
query = <<-SQL
- SELECT DISTINCT on (t.typname) t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
+ SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, r.rngsubtype, t.typtype, t.typbasetype
FROM pg_type as t
LEFT JOIN pg_range as r ON oid = rngtypid
SQL
else
query = <<-SQL
- SELECT DISTINCT on (t.typname) t.oid, t.typname, t.typelem, t.typdelim, t.typinput, t.typtype, t.typbasetype
+ SELECT t.oid, t.typname, t.typelem, t.typdelim, t.typinput, t.typtype, t.typbasetype
FROM pg_type as t
SQL
end