summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py6
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
)