summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2022-11-19 20:39:10 +0100
committerFederico Caselli <cfederico87@gmail.com>2022-12-01 23:50:30 +0100
commit0f2baae6bf72353f785bad394684f2d6fa53e0ef (patch)
tree4d7c2cd6e8a73106aa4f95105968cf6e3fded813 /test/dialect/postgresql/test_compiler.py
parentc440c920aecd6593974e5a0d37cdb9069e5d3e57 (diff)
downloadsqlalchemy-0f2baae6bf72353f785bad394684f2d6fa53e0ef.tar.gz
Fix positional compiling bugs
Fixed a series of issues regarding positionally rendered bound parameters, such as those used for SQLite, asyncpg, MySQL and others. Some compiled forms would not maintain the order of parameters correctly, such as the PostgreSQL ``regexp_replace()`` function as well as within the "nesting" feature of the :class:`.CTE` construct first introduced in :ticket:`4123`. Fixes: #8827 Change-Id: I9813ed7c358cc5c1e26725c48df546b209a442cb
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index ee3372c74..cf5f1c826 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -3415,11 +3415,11 @@ class RegexpTest(fixtures.TestBase, testing.AssertsCompiledSQL):
self.table.c.myid.regexp_replace(
"pattern", "replacement", flags="ig"
),
- "REGEXP_REPLACE(mytable.myid, %(myid_1)s, %(myid_3)s, %(myid_2)s)",
+ "REGEXP_REPLACE(mytable.myid, %(myid_1)s, %(myid_2)s, %(myid_3)s)",
checkparams={
"myid_1": "pattern",
- "myid_3": "replacement",
- "myid_2": "ig",
+ "myid_2": "replacement",
+ "myid_3": "ig",
},
)