]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Repaired server_side_cursors to properly detect
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Jun 2008 15:12:56 +0000 (15:12 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Jun 2008 15:12:56 +0000 (15:12 +0000)
      text() clauses.

CHANGES
lib/sqlalchemy/databases/postgres.py

diff --git a/CHANGES b/CHANGES
index 7f9d208b9e422f28561414ace494984af91cd004..3e53e00bce4b1b9b282e5109164d82750771a454 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,10 @@ CHANGES
       Totally unrelated types, or subtypes not set up with
       mapper inheritance against the target mapper are 
       still not allowed.
+
+- postgres
+    - Repaired server_side_cursors to properly detect 
+      text() clauses.
       
 - mysql
     - Added 'CALL' to the list of SQL keywords which return
index 605ce7272b08788b44ec44d69c1e8736c3cfcd9c..212daa06da3d99a449af89180c6fb71a166684a8 100644 (file)
@@ -272,7 +272,10 @@ class PGExecutionContext(default.DefaultExecutionContext):
             self.dialect.server_side_cursors and \
             ((self.compiled and isinstance(self.compiled.statement, expression.Selectable)) \
             or \
-            (not self.compiled and self.statement and SERVER_SIDE_CURSOR_RE.match(self.statement)))
+            (
+                (not self.compiled or isinstance(self.compiled.statement, expression._TextClause)) 
+                and self.statement and SERVER_SIDE_CURSOR_RE.match(self.statement))
+            )
 
         if self.__is_server_side:
             # use server-side cursors: