summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-04-01 12:26:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-04-01 13:22:26 -0400
commitab01f893f8c489e2fe981699e022c76e0318ec77 (patch)
tree2f6189dc7d041f6f9289ac234517434d279d3acd /lib/sqlalchemy/dialects/postgresql/base.py
parent3a29d65f73c6e705f486588068172d45017285fa (diff)
downloadsqlalchemy-ab01f893f8c489e2fe981699e022c76e0318ec77.tar.gz
Correct for Variant + ARRAY cases in psycopg2
Fixed regression caused by :ticket:`6023` where the PostgreSQL cast operator applied to elements within an :class:`_types.ARRAY` when using psycopg2 would fail to use the correct type in the case that the datatype were also embedded within an instance of the :class:`_types.Variant` adapter. Additionally, repairs support for the correct CREATE TYPE to be emitted when using a ``Variant(ARRAY(some_schema_type))``. Fixes: #6182 Change-Id: I1b9ba7c876980d4650715a0b0801b46bdc72860d
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 0854214d0..97eb07bdb 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1989,7 +1989,6 @@ class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum):
return False
def _on_table_create(self, target, bind, checkfirst=False, **kw):
-
if (
checkfirst
or (