summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-02-13 18:53:21 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-02-13 18:53:21 -0500
commit4bbd814fffb563e38f776d7c11ab162f8095ca51 (patch)
tree02aee0327473b057b16af95fac8440a4ba56c86a /lib/sqlalchemy/dialects/postgresql/base.py
parent1aeb637e70e4f9f098ab8b4c4462975b805e9965 (diff)
downloadsqlalchemy-4bbd814fffb563e38f776d7c11ab162f8095ca51.tar.gz
- [bug] Fixed the "render literal bind" function,
used by Alembic, to escape % signs with %%.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index c4c2bbdb4..51f69b7b2 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -644,6 +644,7 @@ class PGCompiler(compiler.SQLCompiler):
# TODO: need to inspect "standard_conforming_strings"
if self.dialect._backslash_escapes:
value = value.replace('\\', '\\\\')
+ value = value.replace("%", "%%")
return value
def visit_sequence(self, seq):