summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-07-11 19:23:40 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-07-11 19:23:40 -0400
commit520b808db255eba3fdccfb93656a79008154dcae (patch)
tree428dfd4a203a7b161b8a063f69086d7aed6e0608 /lib/sqlalchemy/sql/compiler.py
parentca52e87268fec966f6005b1e4aa30206ae895e9e (diff)
downloadsqlalchemy-520b808db255eba3fdccfb93656a79008154dcae.tar.gz
repair schema_translate_map for schema type use cases
Fixed issue where the PostgreSQL ``ENUM`` datatype as embedded in the ``ARRAY`` datatype would fail to emit correctly in create/drop when the ``schema_translate_map`` feature were also in use. Additionally repairs a related issue where the same ``schema_translate_map`` feature would not work for the ``ENUM`` datatype in combination with a ``CAST``, that's also intrinsic to how the ``ARRAY(ENUM)`` combination works on the PostgreSQL dialect. Fixes: #6739 Change-Id: I44b1ad4db4af3acbf639aa422c46c22dd3b0d3a6
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r--lib/sqlalchemy/sql/compiler.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 4b3b2c293..e92ffcd9a 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -1497,6 +1497,7 @@ class SQLCompiler(Compiled):
def visit_typeclause(self, typeclause, **kw):
kw["type_expression"] = typeclause
+ kw["identifier_preparer"] = self.preparer
return self.dialect.type_compiler.process(typeclause.type, **kw)
def post_process_text(self, text):