From f37aa86df8fa885a5d098930c8a444b96f374f60 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 13 Feb 2012 19:29:38 -0500 Subject: [PATCH] revert this, bad idea --- CHANGES | 4 ---- lib/sqlalchemy/dialects/postgresql/base.py | 1 - test/dialect/test_postgresql.py | 12 ------------ 3 files changed, 17 deletions(-) diff --git a/CHANGES b/CHANGES index b589751eb2..29e8c2ba0f 100644 --- a/CHANGES +++ b/CHANGES @@ -93,10 +93,6 @@ CHANGES commit or rollback transaction with errors on engine.begin(). -- postgresql - - [bug] Fixed the "render literal bind" function, - used by Alembic, to escape % signs with %%. - - mysql - [feature] Added support for the "isolation_level" parameter to all MySQL dialects. Thanks diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 51f69b7b2c..c4c2bbdb4e 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -644,7 +644,6 @@ 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): diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index a537ee3e9e..769f18ce9a 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -74,18 +74,6 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): 'RETURNING length(mytable.name) AS length_1' , dialect=dialect) - def test_render_literal(self): - dialect = postgresql.dialect() - compiler = dialect.statement_compiler(dialect, None) - for value, exp in [ - ('hi', "'hi'"), - ("with 'quotes'", "'with ''quotes'''"), - ('%.%', "'%%.%%'") - ]: - eq_( - compiler.render_literal_value(value, None), - exp - ) def test_insert_returning(self): dialect = postgresql.dialect() -- 2.47.2