Fix up compiler warnings/errors from f4fb45d15.
Per early buildfarm returns.
This commit is contained in:
parent
f4fb45d15c
commit
cc7401d5ca
@ -3415,7 +3415,6 @@ transformJsonConstructorOutput(ParseState *pstate, JsonOutput *output,
|
|||||||
if (!OidIsValid(returning->typid))
|
if (!OidIsValid(returning->typid))
|
||||||
{
|
{
|
||||||
ListCell *lc;
|
ListCell *lc;
|
||||||
bool have_json = false;
|
|
||||||
bool have_jsonb = false;
|
bool have_jsonb = false;
|
||||||
|
|
||||||
foreach(lc, args)
|
foreach(lc, args)
|
||||||
@ -3423,7 +3422,6 @@ transformJsonConstructorOutput(ParseState *pstate, JsonOutput *output,
|
|||||||
Node *expr = lfirst(lc);
|
Node *expr = lfirst(lc);
|
||||||
Oid typid = exprType(expr);
|
Oid typid = exprType(expr);
|
||||||
|
|
||||||
have_json |= typid == JSONOID;
|
|
||||||
have_jsonb |= typid == JSONBOID;
|
have_jsonb |= typid == JSONBOID;
|
||||||
|
|
||||||
if (have_jsonb)
|
if (have_jsonb)
|
||||||
@ -3437,8 +3435,6 @@ transformJsonConstructorOutput(ParseState *pstate, JsonOutput *output,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Note: this includes the have_json case */
|
|
||||||
|
|
||||||
/* XXX TEXT is default by the standard, but we return JSON */
|
/* XXX TEXT is default by the standard, but we return JSON */
|
||||||
returning->typid = JSONOID;
|
returning->typid = JSONOID;
|
||||||
returning->format->format_type = JS_FORMAT_JSON;
|
returning->format->format_type = JS_FORMAT_JSON;
|
||||||
|
@ -9907,9 +9907,11 @@ get_json_constructor(JsonConstructorExpr *ctor, deparse_context *context,
|
|||||||
funcname = "JSON_ARRAY";
|
funcname = "JSON_ARRAY";
|
||||||
break;
|
break;
|
||||||
case JSCTOR_JSON_OBJECTAGG:
|
case JSCTOR_JSON_OBJECTAGG:
|
||||||
return get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
|
get_json_agg_constructor(ctor, context, "JSON_OBJECTAGG", true);
|
||||||
|
return;
|
||||||
case JSCTOR_JSON_ARRAYAGG:
|
case JSCTOR_JSON_ARRAYAGG:
|
||||||
return get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
|
get_json_agg_constructor(ctor, context, "JSON_ARRAYAGG", false);
|
||||||
|
return;
|
||||||
default:
|
default:
|
||||||
elog(ERROR, "invalid JsonConstructorExprType %d", ctor->type);
|
elog(ERROR, "invalid JsonConstructorExprType %d", ctor->type);
|
||||||
}
|
}
|
||||||
@ -10064,7 +10066,7 @@ get_agg_expr_helper(Aggref *aggref, deparse_context *context,
|
|||||||
static void
|
static void
|
||||||
get_agg_expr(Aggref *aggref, deparse_context *context, Aggref *original_aggref)
|
get_agg_expr(Aggref *aggref, deparse_context *context, Aggref *original_aggref)
|
||||||
{
|
{
|
||||||
return get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
|
get_agg_expr_helper(aggref, context, original_aggref, NULL, NULL,
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10182,7 +10184,7 @@ get_windowfunc_expr_helper(WindowFunc *wfunc, deparse_context *context,
|
|||||||
static void
|
static void
|
||||||
get_windowfunc_expr(WindowFunc *wfunc, deparse_context *context)
|
get_windowfunc_expr(WindowFunc *wfunc, deparse_context *context)
|
||||||
{
|
{
|
||||||
return get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
|
get_windowfunc_expr_helper(wfunc, context, NULL, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -10438,11 +10440,11 @@ get_json_agg_constructor(JsonConstructorExpr *ctor, deparse_context *context,
|
|||||||
get_json_constructor_options(ctor, &options);
|
get_json_constructor_options(ctor, &options);
|
||||||
|
|
||||||
if (IsA(ctor->func, Aggref))
|
if (IsA(ctor->func, Aggref))
|
||||||
return get_agg_expr_helper((Aggref *) ctor->func, context,
|
get_agg_expr_helper((Aggref *) ctor->func, context,
|
||||||
(Aggref *) ctor->func,
|
(Aggref *) ctor->func,
|
||||||
funcname, options.data, is_json_objectagg);
|
funcname, options.data, is_json_objectagg);
|
||||||
else if (IsA(ctor->func, WindowFunc))
|
else if (IsA(ctor->func, WindowFunc))
|
||||||
return get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
|
get_windowfunc_expr_helper((WindowFunc *) ctor->func, context,
|
||||||
funcname, options.data,
|
funcname, options.data,
|
||||||
is_json_objectagg);
|
is_json_objectagg);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user