From: KapilDagur Date: Sat, 13 Sep 2025 15:31:55 +0000 (+0530) Subject: wip: wiped from and placed in . X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F12822%2Fhead;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git wip: wiped from and placed in . --- diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 1d534b2792..75e1252318 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -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