From: Amit Langote Date: Thu, 4 Apr 2024 13:01:13 +0000 (+0900) Subject: Add missing initialization in transformJsonFuncExpr() X-Git-Tag: REL_17_BETA1~408 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=6f4d63e989ffbdb44f5856a17fae5ae68c40327d;p=postgresql.git 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 Discussion: https://postgr.es/m/254b2fa2-2f6b-a30a-20ee-21f8a2c12a50@xs4all.nl --- 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);