From: Mike Bayer Date: Sun, 24 Jun 2007 20:00:44 +0000 (+0000) Subject: - fixed limit/offset compilation for postgres X-Git-Tag: rel_0_4_6~182 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3404bd8d821ce2247e696f4df981e455357c4a46;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fixed limit/offset compilation for postgres --- diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index ea92cf7fd2..15cdc23e2a 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -414,12 +414,12 @@ class PGCompiler(ansisql.ANSICompiler): def limit_clause(self, select): text = "" - if select.limit is not None: - text += " \n LIMIT " + str(select.limit) - if select.offset is not None: - if select.limit is None: + if select._limit is not None: + text += " \n LIMIT " + str(select._limit) + if select._offset is not None: + if select._limit is None: text += " \n LIMIT ALL" - text += " OFFSET " + str(select.offset) + text += " OFFSET " + str(select._offset) return text def visit_select_precolumns(self, select):