diff options
Diffstat (limited to 'src/backend/optimizer/util')
| -rw-r--r-- | src/backend/optimizer/util/clauses.c | 78 | 
1 files changed, 0 insertions, 78 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 533df86ff77..5c54171fee0 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -28,7 +28,6 @@  #include "catalog/pg_type.h"  #include "executor/executor.h"  #include "executor/functions.h" -#include "executor/execExpr.h"  #include "funcapi.h"  #include "miscadmin.h"  #include "nodes/makefuncs.h" @@ -51,9 +50,6 @@  #include "utils/builtins.h"  #include "utils/datum.h"  #include "utils/fmgroids.h" -#include "utils/json.h" -#include "utils/jsonb.h" -#include "utils/jsonpath.h"  #include "utils/lsyscache.h"  #include "utils/memutils.h"  #include "utils/syscache.h" @@ -386,45 +382,6 @@ contain_mutable_functions_walker(Node *node, void *context)  								context))  		return true; -	if (IsA(node, JsonConstructorExpr)) -	{ -		const JsonConstructorExpr *ctor = (JsonConstructorExpr *) node; -		ListCell   *lc; -		bool		is_jsonb = -		ctor->returning->format->format_type == JS_FORMAT_JSONB; - -		/* Check argument_type => json[b] conversions */ -		foreach(lc, ctor->args) -		{ -			Oid			typid = exprType(lfirst(lc)); - -			if (is_jsonb ? -				!to_jsonb_is_immutable(typid) : -				!to_json_is_immutable(typid)) -				return true; -		} - -		/* Check all subnodes */ -	} - -	if (IsA(node, JsonExpr)) -	{ -		JsonExpr   *jexpr = castNode(JsonExpr, node); -		Const	   *cnst; - -		if (!IsA(jexpr->path_spec, Const)) -			return true; - -		cnst = castNode(Const, jexpr->path_spec); - -		Assert(cnst->consttype == JSONPATHOID); -		if (cnst->constisnull) -			return false; - -		return jspIsMutable(DatumGetJsonPathP(cnst->constvalue), -							jexpr->passing_names, jexpr->passing_values); -	} -  	if (IsA(node, SQLValueFunction))  	{  		/* all variants of SQLValueFunction are stable */ @@ -896,18 +853,6 @@ max_parallel_hazard_walker(Node *node, max_parallel_hazard_context *context)  								 context, 0);  	} -	/* JsonExpr is parallel-unsafe if subtransactions can be used. */ -	else if (IsA(node, JsonExpr)) -	{ -		JsonExpr   *jsexpr = (JsonExpr *) node; - -		if (ExecEvalJsonNeedsSubTransaction(jsexpr, NULL)) -		{ -			context->max_hazard = PROPARALLEL_UNSAFE; -			return true; -		} -	} -  	/* Recurse to check arguments */  	return expression_tree_walker(node,  								  max_parallel_hazard_walker, @@ -3567,29 +3512,6 @@ eval_const_expressions_mutator(Node *node,  					return ece_evaluate_expr((Node *) newcre);  				return (Node *) newcre;  			} -		case T_JsonValueExpr: -			{ -				JsonValueExpr *jve = (JsonValueExpr *) node; -				Node	   *raw = eval_const_expressions_mutator((Node *) jve->raw_expr, -																 context); - -				if (raw && IsA(raw, Const)) -				{ -					Node	   *formatted; -					Node	   *save_case_val = context->case_val; - -					context->case_val = raw; - -					formatted = eval_const_expressions_mutator((Node *) jve->formatted_expr, -															   context); - -					context->case_val = save_case_val; - -					if (formatted && IsA(formatted, Const)) -						return formatted; -				} -				break; -			}  		default:  			break;  	}  | 
