v1-0001-refactor-ExecInitJsonExpr.no-cfnot

application/octet-stream

Filename: v1-0001-refactor-ExecInitJsonExpr.no-cfnot
Type: application/octet-stream
Part: 0
Message: Re: remaining sql/json patches
From fd7bcbc1396abeddf7276c10a7e12f78bbbf54b9 Mon Sep 17 00:00:00 2001
From: jian he <jian.universality@gmail.com>
Date: Wed, 3 Jan 2024 15:24:25 +0800
Subject: [PATCH v1 1/4] let result_coercion decide we need init coercion relaterd code
 result_coercion should be the only factor decide we need init json coercion or not.
 quote behavior relation with coercion should be decide in function transformJsonFuncExpr.

---
 src/backend/executor/execExpr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index 1afecd09..961b9c95 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -4292,7 +4292,7 @@ ExecInitJsonExpr(JsonExpr *jexpr, ExprState *state,
 	 * nodes.
 	 */
 	jsestate->escontext.type = T_ErrorSaveContext;
-	if (jexpr->result_coercion || jexpr->omit_quotes)
+	if (jexpr->result_coercion)
 	{
 		jsestate->jump_eval_result_coercion =
 			ExecInitJsonExprCoercion(state, jexpr->result_coercion,
-- 
2.34.1