diff options
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index e87c0426e..c31c23885 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -675,6 +675,10 @@ class PGCompiler(compiler.SQLCompiler): def for_update_clause(self, select): if select.for_update == 'nowait': return " FOR UPDATE NOWAIT" + elif select.for_update == 'read': + return " FOR SHARE" + elif select.for_update == 'read_nowait': + return " FOR SHARE NOWAIT" else: return super(PGCompiler, self).for_update_clause(select) |
