postgres.git / summary / log / commit / refs

commit    6f4d63e989ffbdb44f5856a17fae5ae68c40327d
Author:   Amit Langote <amitlan@postgresql.org>
Date:     Thu Apr 04 13:01:13 2024 +0000
First released in: 17.0

    Add missing initialization in transformJsonFuncExpr()
    
    de3600452b added some code for the new JSON_TABLE_OP to that function
    but missed to initialize the default_format variable.
    
    Reported-by: Erik Rijkers <er@xs4all.nl>
    Discussion: https://postgr.es/m/254b2fa2-2f6b-a30a-20ee-21f8a2c12a50@xs4all.nl


src/backend/parser/parse_expr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 66bbba5c7fd..2f87255c470 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -4272,6 +4272,7 @@ transformJsonFuncExpr(ParseState *pstate, JsonFuncExpr *func) break; case JSON_TABLE_OP: func_name = "JSON_TABLE"; + default_format = JS_FORMAT_JSONB; break; default: elog(ERROR, "invalid JsonFuncExpr op %d", (int) func->op); [parent: 2f6e78b0619a]