From 7c3f95375a6a98fa8c70c1e4d9d13012518cfd50 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Tue, 20 Feb 2024 13:50:32 -0800 Subject: [PATCH] Drop the detach_params from the env --- edb/pgsql/compiler/__init__.py | 1 - edb/pgsql/compiler/context.py | 3 --- edb/pgsql/compiler/expr.py | 3 --- 3 files changed, 7 deletions(-) diff --git a/edb/pgsql/compiler/__init__.py b/edb/pgsql/compiler/__init__.py index 7361741289d..cad1378333f 100644 --- a/edb/pgsql/compiler/__init__.py +++ b/edb/pgsql/compiler/__init__.py @@ -121,7 +121,6 @@ def compile_ir_to_sql_tree( scope_tree_nodes=scope_tree_nodes, external_rvars=external_rvars, backend_runtime_params=backend_runtime_params, - detach_params=detach_params, ) ctx = context.CompilerContextLevel( diff --git a/edb/pgsql/compiler/context.py b/edb/pgsql/compiler/context.py index 3ffdd28c0c8..14a270aa4ca 100644 --- a/edb/pgsql/compiler/context.py +++ b/edb/pgsql/compiler/context.py @@ -495,7 +495,6 @@ class Environment: external_rvars: Mapping[Tuple[irast.PathId, str], pgast.PathRangeVar] materialized_views: Dict[uuid.UUID, irast.Set] backend_runtime_params: pgparams.BackendRuntimeParams - detach_params: bool #: A list of CTEs that implement constraint validation at the #: query level. @@ -518,7 +517,6 @@ def __init__( Mapping[Tuple[irast.PathId, str], pgast.PathRangeVar] ] = None, backend_runtime_params: pgparams.BackendRuntimeParams, - detach_params: bool = False, ) -> None: self.aliases = aliases.AliasGenerator() self.output_format = output_format @@ -536,7 +534,6 @@ def __init__( self.materialized_views = {} self.check_ctes = [] self.backend_runtime_params = backend_runtime_params - self.detach_params = detach_params # XXX: this context hack is necessary until pathctx is converted diff --git a/edb/pgsql/compiler/expr.py b/edb/pgsql/compiler/expr.py index 17f5c0f5330..cd195af7455 100644 --- a/edb/pgsql/compiler/expr.py +++ b/edb/pgsql/compiler/expr.py @@ -136,9 +136,6 @@ def compile_Parameter( else: index = ctx.argmap[expr.name].index result = pgast.ParamRef(number=index, nullable=not expr.required) - if ctx.env.detach_params: - # XXX: Do we need this? - return result return pgast.TypeCast( arg=result,