summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-03-10 15:00:21 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-03-10 15:00:21 -0400
commit7ac81f6d0a8481fdd6e5832648ae1ad973da19e4 (patch)
treeea13300c33a6c9aa17a447d7fc37cde1fe3dfbad /lib/sqlalchemy/dialects/postgresql/base.py
parent9d617468a66197ce13c85028889fc3b9965bd78c (diff)
parent955576fcf6e7aff7fe924ec3b33bb6d243ddd312 (diff)
downloadsqlalchemy-7ac81f6d0a8481fdd6e5832648ae1ad973da19e4.tar.gz
Merge branch 'postgres-concurrently' of https://bitbucket.org/iurisilvio/sqlalchemy into pr45
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 1935d0cad..c819f36c3 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1459,7 +1459,13 @@ class PGDDLCompiler(compiler.DDLCompiler):
text = "CREATE "
if index.unique:
text += "UNIQUE "
- text += "INDEX %s ON %s " % (
+ text += "INDEX "
+
+ concurrently = index.dialect_options['postgresql']['concurrently']
+ if concurrently:
+ text += "CONCURRENTLY "
+
+ text += "%s ON %s " % (
self._prepared_index_name(index,
include_schema=False),
preparer.format_table(index.table)
@@ -1812,7 +1818,8 @@ class PGDialect(default.DefaultDialect):
(schema.Index, {
"using": False,
"where": None,
- "ops": {}
+ "ops": {},
+ "concurrently": False,
}),
(schema.Table, {
"ignore_search_path": False,