summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2016-06-08 11:52:22 -0400
committerGerrit Code Review <gerrit2@ln3.zzzcomputing.com>2016-06-08 11:52:22 -0400
commit65b3f4aaa072438006f90033a413f10b911ba717 (patch)
tree365fde4b283ed5f10b44aed461dfea22d289ef50 /doc
parentd34063aa32211c9c2763fbff753601f6c20b8845 (diff)
parent3ebd1b30eb392ff62f08f0755e79a228d61ba7d2 (diff)
downloadsqlalchemy-65b3f4aaa072438006f90033a413f10b911ba717.tar.gz
Merge "Add 'FOR NO KEY UPDATE' / 'FOR KEY SHARE' support for Postgresql"
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/changelog_11.rst10
-rw-r--r--doc/build/changelog/migration_11.rst22
2 files changed, 27 insertions, 5 deletions
diff --git a/doc/build/changelog/changelog_11.rst b/doc/build/changelog/changelog_11.rst
index 5dee9867a..b57336c4a 100644
--- a/doc/build/changelog/changelog_11.rst
+++ b/doc/build/changelog/changelog_11.rst
@@ -110,6 +110,16 @@
Alex Grönholm.
.. change::
+ :tags: feature, postgresql
+ :pullreq: github:297
+
+ Added new parameter
+ :paramref:`.GenerativeSelect.with_for_update.key_share`, which
+ will render the ``FOR NO KEY UPDATE`` version of ``FOR UPDATE``
+ and ``FOR KEY SHARE`` instead of ``FOR SHARE``
+ on the Postgresql backend. Pull request courtesy Sergey Skopin.
+
+ .. change::
:tags: feature, postgresql, oracle
:pullreq: bitbucket:86
diff --git a/doc/build/changelog/migration_11.rst b/doc/build/changelog/migration_11.rst
index 8c138f090..8b8075a29 100644
--- a/doc/build/changelog/migration_11.rst
+++ b/doc/build/changelog/migration_11.rst
@@ -2150,13 +2150,25 @@ should be calling upon ``sqlalchemy.dialects.postgresql``.
Engine URLs of the form ``postgres://`` will still continue to function,
however.
-Support for SKIP LOCKED
------------------------
+Support for FOR UPDATE SKIP LOCKED / FOR NO KEY UPDATE / FOR KEY SHARE
+-----------------------------------------------------------------------
-The new parameter :paramref:`.GenerativeSelect.with_for_update.skip_locked`
-in both Core and ORM will generate the "SKIP LOCKED" suffix for a
-"SELECT...FOR UPDATE" or "SELECT.. FOR SHARE" query.
+The new parameters :paramref:`.GenerativeSelect.with_for_update.skip_locked`
+and :paramref:`.GenerativeSelect.with_for_update.key_share`
+in both Core and ORM apply a modification to a "SELECT...FOR UPDATE"
+or "SELECT...FOR SHARE" query on the Postgresql backend:
+
+* SELECT FOR NO KEY UPDATE::
+
+ stmt = select([table]).with_for_update(key_share=True)
+
+* SELECT FOR UPDATE SKIP LOCKED::
+
+ stmt = select([table]).with_for_update(skip_locked=True)
+
+* SELECT FOR KEY SHARE::
+ stmt = select([table]).with_for_update(read=True, key_share=True)
Dialect Improvements and Changes - MySQL
=============================================