diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-09-27 15:47:47 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci.zzzcomputing.com> | 2017-09-27 15:47:48 -0400 |
| commit | 5b75a623eff8f3cf5bb68c80920a54df2fbc2260 (patch) | |
| tree | c91f9244df0f901afb963900bc14f9a00dfc0b94 /lib | |
| parent | e111852270ee20fbc32934eeefd0883e8ffeaba8 (diff) | |
| parent | 6652f72352730df12adb93d462f309a7efe1ff1f (diff) | |
| download | sqlalchemy-5b75a623eff8f3cf5bb68c80920a54df2fbc2260.tar.gz | |
Merge "Accomodate for multidimensional array in rewriting for COLLATE"
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index d3aa1a756..f911ac167 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1897,8 +1897,10 @@ class PGTypeCompiler(compiler.GenericTypeCompiler): inner = self.process(type_.item_type) return re.sub( r'((?: COLLATE.*)?)$', - (r'[]\1' * - (type_.dimensions if type_.dimensions is not None else 1)), + (r'%s\1' % ( + "[]" * + (type_.dimensions if type_.dimensions is not None else 1) + )), inner ) |
