From 793cf27be28a37e8882d89ba6b79570c79f936ac Mon Sep 17 00:00:00 2001 From: KapilDagur Date: Sat, 13 Sep 2025 21:01:55 +0530 Subject: [PATCH] wip: wiped from and placed in . --- lib/sqlalchemy/dialects/postgresql/base.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.47.3