Merge "Postgresql default to no backslash escaping" into main

This commit is contained in:
Michael Bayer
2026-05-18 16:31:37 +00:00
committed by Gerrit Code Review
6 changed files with 25 additions and 16 deletions
+2 -2
View File
@@ -3219,14 +3219,14 @@ class LikeTest(fixtures.TestBase, testing.AssertsCompiledSQL):
def test_like_7(self):
self.assert_compile(
self.table1.c.myid.ilike("somstr", escape="\\"),
"mytable.myid ILIKE %(myid_1)s::VARCHAR ESCAPE '\\\\'",
"mytable.myid ILIKE %(myid_1)s::VARCHAR ESCAPE '\\'",
dialect=postgresql.dialect(),
)
def test_like_8(self):
self.assert_compile(
~self.table1.c.myid.ilike("somstr", escape="\\"),
"mytable.myid NOT ILIKE %(myid_1)s::VARCHAR ESCAPE '\\\\'",
"mytable.myid NOT ILIKE %(myid_1)s::VARCHAR ESCAPE '\\'",
dialect=postgresql.dialect(),
)