From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Amit Langote <amitlangote09(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Erik Rijkers <er(at)xs4all(dot)nl>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: remaining sql/json patches |
Date: | 2023-12-15 08:36:41 |
Message-ID: | CACJufxG2KT2ALucqfPGTn3ve47M9UE3=8UtneZ-_K9ARr-s6nw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
hi.
since InitJsonItemCoercions cannot return NULL.
per transformJsonFuncExpr, jsexpr->item_coercions not null imply
jsexpr->result_coercion not null.
so I did the attached refactoring.
now every ExecInitJsonExprCoercion function call followed with:
scratch->opcode = EEOP_JUMP;
scratch->d.jump.jumpdone = -1; /* set below */
jumps_to_coerce_finish = lappend_int(jumps_to_coerce_finish,
state->steps_len);
ExprEvalPushStep(state, scratch);
It looks more consistent.
we can also change
+ */
+ if (jexpr->result_coercion || jexpr->item_coercions)
+ {
+
to
+ if (jexpr->result_coercion)
since jexpr->item_coercions not null imply jexpr->result_coercion not null.
Attachment | Content-Type | Size |
---|---|---|
test.patch | text/x-patch | 1.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2023-12-15 08:58:22 | Re: planner chooses incremental but not the best one |
Previous Message | Andrei Lepikhov | 2023-12-15 08:36:08 | Re: Statistics Import and Export |