Skip to content

Commit cc7401d

Browse files
committed
Fix up compiler warnings/errors from f4fb45d.
Per early buildfarm returns.
1 parent f4fb45d commit cc7401d

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

src/backend/parser/parse_expr.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3415,15 +3415,13 @@ transformJsonConstructorOutput(ParseState *pstate, JsonOutput *output,
34153415
if (!OidIsValid(returning->typid))
34163416
{
34173417
ListCell *lc;
3418-
bool have_json = false;
34193418
bool have_jsonb = false;
34203419

34213420
foreach(lc, args)
34223421
{
34233422
Node *expr = lfirst(lc);
34243423
Oid typid = exprType(expr);
34253424

3426-
have_json |= typid == JSONOID;
34273425
have_jsonb |= typid == JSONBOID;
34283426

34293427
if (have_jsonb)
@@ -3437,8 +3435,6 @@ transformJsonConstructorOutput(ParseState *pstate, JsonOutput *output,
34373435
}
34383436
else
34393437
{
3440-
/* Note: this includes the have_json case */
3441-
34423438
/* XXX TEXT is default by the standard, but we return JSON */
34433439
returning->typid = JSONOID;
34443440
returning->format->format_type = JS_FORMAT_JSON;

src/backend/utils/adt/ruleutils.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9907,9 +9907,11 @@ get_json_constructor(JsonConstructorExpr *ctor, deparse_context *context,
99079907
funcname = "JSON_ARRAY";
99089908
break;
99099909
case JSCTOR_JSON_OBJECTAGG:
9910-
return get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
9910+
get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
9911+
return;
99119912
case JSCTOR_JSON_ARRAYAGG:
9912-
return get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
9913+
get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
9914+
return;
99139915
default:
99149916
elog(ERROR, "invalid JsonConstructorExprType %d", ctor->type);
99159917
}
@@ -10064,8 +10066,8 @@ get_agg_expr_helper(Aggref *aggref, deparse_context *context,
1006410066
static void
1006510067
get_agg_expr(Aggref *aggref, deparse_context *context, Aggref *original_aggref)
1006610068
{
10067-
return get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
10068-
false);
10069+
get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
10070+
false);
1006910071
}
1007010072

1007110073
/*
@@ -10182,7 +10184,7 @@ get_windowfunc_expr_helper(WindowFunc *wfunc, deparse_context *context,
1018210184
static void
1018310185
get_windowfunc_expr(WindowFunc *wfunc, deparse_context *context)
1018410186
{
10185-
return get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
10187+
get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
1018610188
}
1018710189

1018810190
/*
@@ -10438,13 +10440,13 @@ get_json_agg_constructor(JsonConstructorExpr *ctor, deparse_context *context,
1043810440
get_json_constructor_options(ctor, &options);
1043910441

1044010442
if (IsA(ctor->func, Aggref))
10441-
return get_agg_expr_helper((Aggref *) ctor->func, context,
10442-
(Aggref *) ctor->func,
10443-
funcname, options.data, is_json_objectagg);
10443+
get_agg_expr_helper((Aggref *) ctor->func, context,
10444+
(Aggref *) ctor->func,
10445+
funcname, options.data, is_json_objectagg);
1044410446
else if (IsA(ctor->func, WindowFunc))
10445-
return get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
10446-
funcname, options.data,
10447-
is_json_objectagg);
10447+
get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
10448+
funcname, options.data,
10449+
is_json_objectagg);
1044810450
else
1044910451
elog(ERROR, "invalid JsonConstructorExpr underlying node type: %d",
1045010452
nodeTag(ctor->func));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy