aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_expr.c
diff options
context:
space:
mode:
authorAmit Langote <amitlan@postgresql.org>2024-04-04 22:01:13 +0900
committerAmit Langote <amitlan@postgresql.org>2024-04-04 22:01:13 +0900
commit6f4d63e989ffbdb44f5856a17fae5ae68c40327d (patch)
tree87dee0d9987a2feea8915579294916607f06d5bd /src/backend/parser/parse_expr.c
parent2f6e78b0619a0ee2ca170e0073659581847ee73d (diff)
downloadpostgresql-6f4d63e989ffbdb44f5856a17fae5ae68c40327d.tar.gz
postgresql-6f4d63e989ffbdb44f5856a17fae5ae68c40327d.zip
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
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r--src/backend/parser/parse_expr.c1
1 files changed, 1 insertions, 0 deletions
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);