]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Only replace first occurrence for COLLATE/ARRAY syntax
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Mar 2018 16:33:30 +0000 (11:33 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Mar 2018 16:33:30 +0000 (11:33 -0500)
Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
in :ticket:`4006` where new behaviors in Python 3.7 regular expressions
caused the fix to fail.

Change-Id: Ied3893d7cac210befa0277b55b3b895b0ba1f0d2
Fixes: #4208
doc/build/changelog/unreleased_11/4208.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/base.py

diff --git a/doc/build/changelog/unreleased_11/4208.rst b/doc/build/changelog/unreleased_11/4208.rst
new file mode 100644 (file)
index 0000000..6624ce3
--- /dev/null
@@ -0,0 +1,7 @@
+.. change::
+    :tags: bug, postgresql, py3k
+    :tickets: 4208
+
+    Fixed bug in Postgresql COLLATE / ARRAY adjustment first introduced
+    in :ticket:`4006` where new behaviors in Python 3.7 regular expressions
+    caused the fix to fail.
index 0cc7c307fa704ea111fc19fd7e8ae5555211c1ff..5ae27a9963fcc07db9b8f20d40019cfd364714c8 100644 (file)
@@ -1967,7 +1967,8 @@ class PGTypeCompiler(compiler.GenericTypeCompiler):
                 "[]" *
                 (type_.dimensions if type_.dimensions is not None else 1)
             )),
-            inner
+            inner,
+            count=1
         )