From 29709cd3f3b997015071bbe9336744b5673bc587 Mon Sep 17 00:00:00 2001 From: Matthew Draper Date: Tue, 14 Mar 2017 18:53:42 +1030 Subject: 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. --- .../lib/active_record/connection_adapters/postgresql_adapter.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord') 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 -- cgit v1.2.3