From 6f4d63e989ffbdb44f5856a17fae5ae68c40327d Mon Sep 17 00:00:00 2001 From: Amit Langote Date: Thu, 4 Apr 2024 22:01:13 +0900 Subject: [PATCH] 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 --- 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);