aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Langote <amitlan@postgresql.org>2024-07-26 16:37:59 +0900
committerAmit Langote <amitlan@postgresql.org>2024-07-26 16:37:59 +0900
commit8a1a4087bd5fd09f42bcca2c91ff7eceaa2a0eab (patch)
tree09c88027460b7cf4e476b8840c29a37074129c77
parent3c3ccd4ca80136939abf97a7c19b67486dfda3af (diff)
downloadpostgresql-8a1a4087bd5fd09f42bcca2c91ff7eceaa2a0eab.tar.gz
postgresql-8a1a4087bd5fd09f42bcca2c91ff7eceaa2a0eab.zip
SQL/JSON: Remove useless code in ExecInitJsonExpr()
The code was for adding an unconditional JUMP to the next step, which is unnecessary processing. Reported-by: Jian He <jian.universality@gmail.com> Discussion: https://postgr.es/m/CACJufxEo4sUjKCYtda0_qt9tazqqKPmF1cqhW9KBOUeJFqQd2g@mail.gmail.com Backpatch-through: 17
-rw-r--r--src/backend/executor/execExpr.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c
index b10359e3d6b..f1caf48036b 100644
--- a/src/backend/executor/execExpr.c
+++ b/src/backend/executor/execExpr.c
@@ -4313,21 +4313,6 @@ ExecInitJsonExpr(JsonExpr *jsexpr, ExprState *state,
ExprEvalPushStep(state, scratch);
/*
- * Jump to coerce the NULL using json_populate_type() if needed. Coercing
- * NULL is only interesting when the RETURNING type is a domain whose
- * constraints must be checked. jsexpr->use_json_coercion must have been
- * set in that case.
- */
- if (get_typtype(jsexpr->returning->typid) == TYPTYPE_DOMAIN &&
- DomainHasConstraints(jsexpr->returning->typid))
- {
- Assert(jsexpr->use_json_coercion);
- scratch->opcode = EEOP_JUMP;
- scratch->d.jump.jumpdone = state->steps_len + 1;
- ExprEvalPushStep(state, scratch);
- }
-
- /*
* To handle coercion errors softly, use the following ErrorSaveContext to
* pass to ExecInitExprRec() when initializing the coercion expressions
* and in the EEOP_JSONEXPR_COERCION step.