Re: BUG #18657: Using JSON_OBJECTAGG with volatile function leads to segfault
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Amit Langote <amitlangote09@gmail.com>
Cc: Tender Wang <tndrwang@gmail.com>, Michael Paquier <michael@paquier.xyz>,
exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2024-10-16T14:26:39Z
Lists: pgsql-bugs
Amit Langote <amitlangote09@gmail.com> writes: > Also, it might be better to leave a comment where the commit is > removing code, as follows: > - if (WALK(jve->raw_expr)) > - return true; > + /* Ignore raw_expr because it's not relevant at runtime. */ Would it be better for parse analysis to explicitly NULL out this field once it's done looking at it? Carrying unmaintained pieces of an expression tree around seems both inefficient and prone to future failures of this same ilk. The further the raw_expr gets out of step with current reality, the worse the hazards. regards, tom lane
Commits
-
SQL/JSON: Fix some oversights in commit b6e1157e7
- 7148cb3e3067 17.1 landed
- fa4f11854c8b 16.5 landed
- 11c87216d134 18.0 landed
-
Don't include CaseTestExpr in JsonValueExpr.formatted_expr
- b6e1157e7d33 17.0 cited