aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
diff options
context:
space:
mode:
authorDan McClain <git@danmcclain.net>2013-03-25 13:33:37 -0400
committerDan McClain <git@danmcclain.net>2013-03-25 17:56:38 -0400
commite199dc1a570d4f0d9a07628268835bce5aab2732 (patch)
tree693717ae53d7043907f7c7ae9a0bc13ac14d7831 /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
parent1a838ccda4a31bb023985f6c977e6bc3e238cda9 (diff)
downloadrails-e199dc1a570d4f0d9a07628268835bce5aab2732.tar.gz
rails-e199dc1a570d4f0d9a07628268835bce5aab2732.tar.bz2
rails-e199dc1a570d4f0d9a07628268835bce5aab2732.zip
Adds support for concurrent indexing in PostgreSQL adapter
Adds support for algorithm option in MySQL indexes Moves USING and algorithm options upstream The syntax is still specific to the Adapter, so the actual executed string happens in the corresponding adapter
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index d26b676335..46e41e6b48 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -433,6 +433,10 @@ module ActiveRecord
true
end
+ def index_algorithms
+ { concurrently: 'CONCURRENTLY' }
+ end
+
class StatementPool < ConnectionAdapters::StatementPool
def initialize(connection, max)
super