diff options
author | Amit Langote <amitlan@postgresql.org> | 2024-07-26 16:38:46 +0900 |
---|---|---|
committer | Amit Langote <amitlan@postgresql.org> | 2024-07-26 16:38:46 +0900 |
commit | 6f9a62b454e8d36f57d54efa141c464f69ce9206 (patch) | |
tree | 3332791012b1c31eec9edee26203f1ba4fc50f36 /src/backend/executor | |
parent | 4fc6a555606de003690d46e900339e78214ee363 (diff) | |
download | postgresql-6f9a62b454e8d36f57d54efa141c464f69ce9206.tar.gz postgresql-6f9a62b454e8d36f57d54efa141c464f69ce9206.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
Diffstat (limited to 'src/backend/executor')
-rw-r--r-- | src/backend/executor/execExpr.c | 15 |
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. |