diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-14 22:11:05 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2008-11-14 22:11:05 +0000 |
commit | 1ff2b7826876dfadc1ce11e8b15a3cb6ac5d289f (patch) | |
tree | 4ed4f50e4411c8a1d67fcd4bfb1137a172211a00 /lib/sqlalchemy/databases/postgres.py | |
parent | 1214e74a3853b325adbae4e99610f362a10a7ce9 (diff) | |
download | sqlalchemy-1ff2b7826876dfadc1ce11e8b15a3cb6ac5d289f.tar.gz |
- bump, this may become 0.5.0
- Calling alias.execute() in conjunction with
server_side_cursors won't raise AttributeError.
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 69fad230d..57620c007 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -235,7 +235,8 @@ class PGExecutionContext(default.DefaultExecutionContext): # TODO: coverage for server side cursors + select.for_update() is_server_side = \ self.dialect.server_side_cursors and \ - ((self.compiled and isinstance(self.compiled.statement, expression.Selectable) and not self.compiled.statement.for_update) \ + ((self.compiled and isinstance(self.compiled.statement, expression.Selectable) + and not getattr(self.compiled.statement, 'for_update', False)) \ or \ ( (not self.compiled or isinstance(self.compiled.statement, expression._TextClause)) |