Skip to content

Commit 4c14578

Browse files
committed
inline current_schema() expression in base_postgres._get_current_schema()
1 parent 090fe11 commit 4c14578

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

sqlmesh/core/engine_adapter/base_postgres.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class BasePostgresEngineAdapter(EngineAdapter):
3030
COMMENT_CREATION_VIEW = CommentCreationView.COMMENT_COMMAND_ONLY
3131
SUPPORTS_QUERY_EXECUTION_TRACKING = True
3232
SUPPORTED_DROP_CASCADE_OBJECT_KINDS = ["SCHEMA", "TABLE", "VIEW"]
33-
CURRENT_SCHEMA_EXPRESSION = exp.func("current_schema")
3433

3534
def columns(
3635
self, table_name: TableName, include_pseudo_columns: bool = False
@@ -201,7 +200,7 @@ def _get_data_objects(
201200

202201
def _get_current_schema(self) -> str:
203202
"""Returns the current default schema for the connection."""
204-
result = self.fetchone(exp.select(self.CURRENT_SCHEMA_EXPRESSION))
203+
result = self.fetchone(exp.select(exp.func("current_schema")))
205204
if result and result[0]:
206205
return result[0]
207206
return "public"

0 commit comments

Comments
 (0)