From 3404bd8d821ce2247e696f4df981e455357c4a46 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sun, 24 Jun 2007 20:00:44 +0000 Subject: [PATCH] - fixed limit/offset compilation for postgres --- lib/sqlalchemy/databases/postgres.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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): -- 2.47.3