Fixed #26500 -- Added SKIP LOCKED support to select_for_update().

Thanks Tim for the review.
This commit is contained in:
Simon Charette 2016-06-23 11:52:14 -04:00
parent 46509cf13d
commit b8e6e1b43b
No known key found for this signature in database
GPG key ID: 72AF89A0B1B4EDB3
11 changed files with 98 additions and 27 deletions

View file

@ -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