Merge pull request #6156 from matrix-org/erikj/postgres_any

Use Postgres ANY for selecting many values.
This commit is contained in:
Erik Johnston 2019-10-10 16:41:36 +01:00 committed by GitHub
commit 83d86106a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 189 additions and 108 deletions

View file

@ -86,6 +86,12 @@ class PostgresEngine(object):
"""
return True
@property
def supports_using_any_list(self):
"""Do we support using `a = ANY(?)` and passing a list
"""
return True
def is_deadlock(self, error):
if isinstance(error, self.module.DatabaseError):
# https://www.postgresql.org/docs/current/static/errcodes-appendix.html