From b191254d8aceca10b40dd5957f3ddf9147a4c534 Mon Sep 17 00:00:00 2001 From: Ants Aasma Date: Tue, 26 Jun 2007 16:37:30 +0000 Subject: fix #624, modulo operator escaping on mysql and postgres someone should test this with oracle, firebird and sql server also --- lib/sqlalchemy/databases/postgres.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/sqlalchemy/databases/postgres.py') diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 0eca18be3..a514b9de0 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -532,6 +532,8 @@ class PGCompiler(ansisql.ANSICompiler): def binary_operator_string(self, binary): if isinstance(binary.type, sqltypes.String) and binary.operator == '+': return '||' + elif binary.operator == '%': + return '%%' else: return ansisql.ANSICompiler.binary_operator_string(self, binary) -- cgit v1.2.1