]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
wip: wiped from and placed in . 12822/head
authorKapilDagur <kapildagur1306@gmail.com>
Sat, 13 Sep 2025 15:31:55 +0000 (21:01 +0530)
committerKapilDagur <kapildagur1306@gmail.com>
Sat, 13 Sep 2025 15:31:55 +0000 (21:01 +0530)
lib/sqlalchemy/dialects/postgresql/base.py

index 1d534b2792b2206041aac4c97fdc8b58e66c7ac2..75e125231818027ece4fb1d23fe0b9612e4ea563 100644 (file)
@@ -2873,7 +2873,8 @@ class PGIdentifierPreparer(compiler.IdentifierPreparer):
         schema (excluding "public" to preserve legacy behavior), and
         enforces explicit schema for builtin names when unresolved.
         """
-        schema = getattr(type_, "schema", None)
+
+        schema = self.schema_for_object(type_)
 
         # Apply schema translation first (if available)
         if getattr(self, "schema_translate_map", None):
@@ -2907,9 +2908,7 @@ class PGIdentifierPreparer(compiler.IdentifierPreparer):
         name = self.quote(type_.name)
 
         # prefer schema from object, fall back to override
-        effective_schema = self.schema_for_object(
-            type_
-        ) or self._get_schema_for_type(type_)
+        effective_schema = self._get_schema_for_type(type_)
 
         if (
             not self.omit_schema