1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-16 17:07:43 +03:00

Code review for commit b6e1157e7d

b6e1157e7d made some changes to enforce that
JsonValueExpr.formatted_expr is always set and is the expression that
gives a JsonValueExpr its runtime value, but that's not really
apparent from the comments about and the code manipulating
formatted_expr.  This commit fixes that.

Per suggestion from Álvaro Herrera.

Discussion: https://postgr.es/m/20230718155313.3wqg6encgt32adqb%40alvherre.pgsql
This commit is contained in:
Amit Langote
2023-07-21 19:15:34 +09:00
parent 97ff8dd02c
commit 7c7412cae3
6 changed files with 24 additions and 20 deletions

View File

@@ -225,9 +225,7 @@ exprType(const Node *expr)
{
const JsonValueExpr *jve = (const JsonValueExpr *) expr;
type = exprType((Node *)
(jve->formatted_expr ? jve->formatted_expr :
jve->raw_expr));
type = exprType((Node *) jve->formatted_expr);
}
break;
case T_JsonConstructorExpr: