summaryrefslogtreecommitdiff
path: root/django/db/backends/postgresql
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2016-06-23 11:52:14 -0400
committerSimon Charette <charette.s@gmail.com>2016-08-08 12:01:43 -0400
commitb8e6e1b43b0bccec178dcc6708c5c8295abfb2e5 (patch)
treef3c146f02ecf6b0181d790cc67d83ad53cd629f9 /django/db/backends/postgresql
parent46509cf13dbf049f75077981c29ef2c60b5a96ab (diff)
Fixed #26500 -- Added SKIP LOCKED support to select_for_update().
Thanks Tim for the review.
Diffstat (limited to 'django/db/backends/postgresql')
-rw-r--r--django/db/backends/postgresql/features.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/postgresql/features.py b/django/db/backends/postgresql/features.py
index 218a7645de..a9e1c77480 100644
--- a/django/db/backends/postgresql/features.py
+++ b/django/db/backends/postgresql/features.py
@@ -1,5 +1,6 @@
from django.db.backends.base.features import BaseDatabaseFeatures
from django.db.utils import InterfaceError
+from django.utils.functional import cached_property
class DatabaseFeatures(BaseDatabaseFeatures):
@@ -31,3 +32,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
greatest_least_ignores_nulls = True
can_clone_databases = True
supports_temporal_subtraction = True
+
+ @cached_property
+ def has_select_for_update_skip_locked(self):
+ return self.connection.pg_version >= 90500