{
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("key value must be scalar, not array, composite, or json")));
+ errmsg("key value must be scalar, not array, composite, or json")));
}
else
{
for (i = 0; i < nargs; i += 2)
{
-
/* process key */
if (PG_ARGISNULL(i))
if (val_type == UNKNOWNOID && get_fn_expr_arg_stable(fcinfo->flinfo, i))
{
val_type = TEXTOID;
- if (PG_ARGISNULL(i))
- arg = (Datum) 0;
- else
- arg = CStringGetTextDatum(PG_GETARG_POINTER(i));
+ arg = CStringGetTextDatum(PG_GETARG_POINTER(i));
}
else
{
if (val_type == InvalidOid || val_type == UNKNOWNOID)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("argument %d: could not determine data type", i + 1)));
+ errmsg("argument %d: could not determine data type", i + 1)));
add_jsonb(arg, false, &result, val_type, true);
if (val_type == InvalidOid || val_type == UNKNOWNOID)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("argument %d: could not determine data type", i + 2)));
+ errmsg("argument %d: could not determine data type", i + 2)));
add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
-
}
result.res = pushJsonbValue(&result.parseState, WJB_END_OBJECT, NULL);
for (i = 0; i < nargs; i++)
{
val_type = get_fn_expr_argtype(fcinfo->flinfo, i);
- arg = PG_GETARG_DATUM(i + 1);
/* see comments in jsonb_build_object above */
if (val_type == UNKNOWNOID && get_fn_expr_arg_stable(fcinfo->flinfo, i))
{
if (val_type == InvalidOid || val_type == UNKNOWNOID)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("argument %d: could not determine data type", i + 1)));
+ errmsg("argument %d: could not determine data type", i + 1)));
add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
}