]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- changelog and docs for pullreq bitbucket:45
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Mar 2015 19:05:27 +0000 (15:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 10 Mar 2015 19:05:27 +0000 (15:05 -0400)
doc/build/changelog/changelog_09.rst
lib/sqlalchemy/dialects/postgresql/base.py

index baa8bb3d217315cd158c258ee0c5aa78b421ab9d..7c487fc1b42db69b61aefb26a2e6523776c98703 100644 (file)
 .. changelog::
     :version: 0.9.9
 
+    .. change::
+        :tags: feature, postgresql
+        :pullreq: bitbucket:45
+
+        Added support for the ``CONCURRENTLY`` keyword with Postgresql
+        indexes, established using ``postgresql_concurrently``.  Pull
+        request courtesy Iuri de Silvio.
+
+        .. seealso::
+
+            :ref:`postgresql_index_concurrently`
+
     .. change::
         :tags: bug, ext, py3k
         :pullreq: github:154
index c819f36c3d160b3b2e06ad68185379397ba47d4f..5899bb411815dbfdfa1e0181bd5ba1533b65b4a9 100644 (file)
@@ -402,6 +402,24 @@ underlying CREATE INDEX command, so it *must* be a valid index type for your
 version of PostgreSQL.
 
 
+.. _postgresql_index_concurrently:
+
+Indexes with CONCURRENTLY
+^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Postgresql index option CONCURRENTLY is supported by passing the
+flag ``postgresql_concurrently`` to the :class:`.Index` construct::
+
+    tbl = Table('testtbl', m, Column('data', Integer))
+
+    idx1 = Index('test_idx1', tbl.c.data, postgresql_concurrently=True)
+
+The above index construct will render SQL as::
+
+    CREATE INDEX CONCURRENTLY test_idx1 ON testtbl (data)
+
+.. versionadded:: 0.9.9
+
 .. _postgresql_index_reflection:
 
 Postgresql Index Reflection