@@ -1162,8 +1162,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1162
1162
if (escontext .error_occurred )
1163
1163
RETURN_ERROR (ereport (ERROR ,
1164
1164
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1165
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type double precision " ,
1166
- tmp , jspOperationName (jsp -> type )))));
1165
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1166
+ tmp , jspOperationName (jsp -> type ), "double precision" ))));
1167
1167
if (isinf (val ) || isnan (val ))
1168
1168
RETURN_ERROR (ereport (ERROR ,
1169
1169
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
@@ -1188,8 +1188,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1188
1188
if (escontext .error_occurred )
1189
1189
RETURN_ERROR (ereport (ERROR ,
1190
1190
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1191
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type double precision " ,
1192
- tmp , jspOperationName (jsp -> type )))));
1191
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1192
+ tmp , jspOperationName (jsp -> type ), "double precision" ))));
1193
1193
if (isinf (val ) || isnan (val ))
1194
1194
RETURN_ERROR (ereport (ERROR ,
1195
1195
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
@@ -1276,10 +1276,11 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1276
1276
if (have_error )
1277
1277
RETURN_ERROR (ereport (ERROR ,
1278
1278
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1279
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type bigint " ,
1279
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1280
1280
DatumGetCString (DirectFunctionCall1 (numeric_out ,
1281
1281
NumericGetDatum (jb -> val .numeric ))),
1282
- jspOperationName (jsp -> type )))));
1282
+ jspOperationName (jsp -> type ),
1283
+ "bigint" ))));
1283
1284
1284
1285
datum = Int64GetDatum (val );
1285
1286
res = jperOk ;
@@ -1300,8 +1301,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1300
1301
if (!noerr || escontext .error_occurred )
1301
1302
RETURN_ERROR (ereport (ERROR ,
1302
1303
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1303
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type bigint " ,
1304
- tmp , jspOperationName (jsp -> type )))));
1304
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1305
+ tmp , jspOperationName (jsp -> type ), "bigint" ))));
1305
1306
res = jperOk ;
1306
1307
}
1307
1308
@@ -1352,8 +1353,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1352
1353
if (!noerr || escontext .error_occurred )
1353
1354
RETURN_ERROR (ereport (ERROR ,
1354
1355
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1355
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type boolean " ,
1356
- tmp , jspOperationName (jsp -> type )))));
1356
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1357
+ tmp , jspOperationName (jsp -> type ), "boolean" ))));
1357
1358
1358
1359
ival = DatumGetInt32 (datum );
1359
1360
if (ival == 0 )
@@ -1372,8 +1373,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1372
1373
if (!parse_bool (tmp , & bval ))
1373
1374
RETURN_ERROR (ereport (ERROR ,
1374
1375
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1375
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type boolean " ,
1376
- tmp , jspOperationName (jsp -> type )))));
1376
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1377
+ tmp , jspOperationName (jsp -> type ), "boolean" ))));
1377
1378
1378
1379
res = jperOk ;
1379
1380
}
@@ -1434,8 +1435,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1434
1435
if (!noerr || escontext .error_occurred )
1435
1436
RETURN_ERROR (ereport (ERROR ,
1436
1437
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1437
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type numeric " ,
1438
- numstr , jspOperationName (jsp -> type )))));
1438
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1439
+ numstr , jspOperationName (jsp -> type ), "numeric" ))));
1439
1440
1440
1441
num = DatumGetNumeric (datum );
1441
1442
if (numeric_is_nan (num ) || numeric_is_inf (num ))
@@ -1523,8 +1524,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1523
1524
if (!noerr || escontext .error_occurred )
1524
1525
RETURN_ERROR (ereport (ERROR ,
1525
1526
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1526
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type numeric " ,
1527
- numstr , jspOperationName (jsp -> type )))));
1527
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1528
+ numstr , jspOperationName (jsp -> type ), "numeric" ))));
1528
1529
1529
1530
num = DatumGetNumeric (numdatum );
1530
1531
pfree (arrtypmod );
@@ -1556,10 +1557,10 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1556
1557
if (have_error )
1557
1558
RETURN_ERROR (ereport (ERROR ,
1558
1559
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1559
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type integer " ,
1560
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1560
1561
DatumGetCString (DirectFunctionCall1 (numeric_out ,
1561
1562
NumericGetDatum (jb -> val .numeric ))),
1562
- jspOperationName (jsp -> type )))));
1563
+ jspOperationName (jsp -> type ), "integer" ))));
1563
1564
1564
1565
datum = Int32GetDatum (val );
1565
1566
res = jperOk ;
@@ -1580,8 +1581,8 @@ executeItemOptUnwrapTarget(JsonPathExecContext *cxt, JsonPathItem *jsp,
1580
1581
if (!noerr || escontext .error_occurred )
1581
1582
RETURN_ERROR (ereport (ERROR ,
1582
1583
(errcode (ERRCODE_NON_NUMERIC_SQL_JSON_ITEM ),
1583
- errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type integer " ,
1584
- tmp , jspOperationName (jsp -> type )))));
1584
+ errmsg ("argument \"%s\" of jsonpath item method .%s() is invalid for type %s " ,
1585
+ tmp , jspOperationName (jsp -> type ), "integer" ))));
1585
1586
res = jperOk ;
1586
1587
}
1587
1588
0 commit comments