Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN
Дата
Msg-id CAMbWs48QUhcvoPCDkR1xujcPG8AqiyqygfOicLYmaF94c1Lrcw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #19046: Incorrect result when using json_array() with column reference in subquery combined with RIGHT JOIN  (Tender Wang <tndrwang@gmail.com>)
Список pgsql-bugs
On Fri, Sep 12, 2025 at 9:57 AM Tender Wang <tndrwang@gmail.com> wrote:
> Tom Lane <tgl@sss.pgh.pa.us> 于2025年9月11日周四 11:16写道:
>> Seems like we ought to actually look at the relevant code, not
>> try to test our way to an understanding of it.

> /* JUMP to return NULL if formatted_expr evaluates to NULL */
> jumps_return_null = lappend_int(jumps_return_null, state->steps_len);
> scratch->opcode = EEOP_JUMP_IF_NULL;
> scratch->resnull = &jsestate->formatted_expr.isnull;
> scratch->d.jump.jumpdone = -1; /* set below */
> ExprEvalPushStep(state, scratch);

Yeah, this suggests that JsonExpr behaves as a strict construct.

There may be other functions that should be treated as non-strict but
currently aren't.  For now, I suggest we address JsonConstructorExpr
first.  If we encounter more such cases later, they should be
straightforward to fix as well.

- Richard



В списке pgsql-bugs по дате отправления: