diff options
author | Ants Aasma <ants.aasma@gmail.com> | 2007-06-26 16:37:30 +0000 |
---|---|---|
committer | Ants Aasma <ants.aasma@gmail.com> | 2007-06-26 16:37:30 +0000 |
commit | b191254d8aceca10b40dd5957f3ddf9147a4c534 (patch) | |
tree | 1362d1c2b224c1b3a102f5656236e61be18b320f /lib/sqlalchemy/databases/postgres.py | |
parent | 987581e6d2c893f4fe1c6877bd4b096f00ff63c3 (diff) | |
download | sqlalchemy-b191254d8aceca10b40dd5957f3ddf9147a4c534.tar.gz |
fix #624, modulo operator escaping on mysql and postgres
someone should test this with oracle, firebird and sql server also
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r-- | lib/sqlalchemy/databases/postgres.py | 2 |
1 files changed, 2 insertions, 0 deletions
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) |