@@ -537,12 +537,12 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
537
537
ereport (ERROR ,
538
538
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
539
539
errmsg ("cannot call %s on a scalar" ,
540
- "jsonb_object_keys " )));
540
+ JSONB "_object_keys " )));
541
541
else if (JB_ROOT_IS_ARRAY (jb ))
542
542
ereport (ERROR ,
543
543
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
544
544
errmsg ("cannot call %s on an array" ,
545
- "jsonb_object_keys " )));
545
+ JSONB "_object_keys " )));
546
546
547
547
funcctx = SRF_FIRSTCALL_INIT ();
548
548
oldcontext = MemoryContextSwitchTo (funcctx -> multi_call_memory_ctx );
@@ -1524,7 +1524,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text)
1524
1524
/* Container must be array, but make sure */
1525
1525
1526
1526
if (!JsonContainerIsArray (container ))
1527
- elog (ERROR ,"not ajsonb array" );
1527
+ elog (ERROR ,"not a" JSONB " array" );
1528
1528
1529
1529
nelements = JsonContainerSize (container ) >=0 ?
1530
1530
JsonContainerSize (container ) :
@@ -1702,7 +1702,7 @@ json_each(PG_FUNCTION_ARGS)
1702
1702
Datum
1703
1703
jsonb_each (PG_FUNCTION_ARGS )
1704
1704
{
1705
- return each_worker_jsonb (fcinfo ,"jsonb_each " , false);
1705
+ return each_worker_jsonb (fcinfo ,JSONB "_each " , false);
1706
1706
}
1707
1707
1708
1708
#ifndef JSON_GENERIC
@@ -1716,7 +1716,7 @@ json_each_text(PG_FUNCTION_ARGS)
1716
1716
Datum
1717
1717
jsonb_each_text (PG_FUNCTION_ARGS )
1718
1718
{
1719
- return each_worker_jsonb (fcinfo ,"jsonb_each_text " , true);
1719
+ return each_worker_jsonb (fcinfo ,JSONB "_each_text " , true);
1720
1720
}
1721
1721
1722
1722
static Datum
@@ -1769,7 +1769,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
1769
1769
MemoryContextSwitchTo (old_cxt );
1770
1770
1771
1771
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
1772
- "jsonb_each temporary cxt" ,
1772
+ JSONB "_each temporary cxt" ,
1773
1773
ALLOCSET_DEFAULT_SIZES );
1774
1774
1775
1775
it = JsonbIteratorInit (& jb -> root );
@@ -2026,13 +2026,13 @@ each_scalar(void *state, char *token, JsonTokenType tokentype)
2026
2026
Datum
2027
2027
jsonb_array_elements (PG_FUNCTION_ARGS )
2028
2028
{
2029
- return elements_worker_jsonb (fcinfo ,"jsonb_array_elements " , false);
2029
+ return elements_worker_jsonb (fcinfo ,JSONB "_array_elements " , false);
2030
2030
}
2031
2031
2032
2032
Datum
2033
2033
jsonb_array_elements_text (PG_FUNCTION_ARGS )
2034
2034
{
2035
- return elements_worker_jsonb (fcinfo ,"jsonb_array_elements_text " , true);
2035
+ return elements_worker_jsonb (fcinfo ,JSONB "_array_elements_text " , true);
2036
2036
}
2037
2037
2038
2038
static Datum
@@ -2086,7 +2086,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
2086
2086
MemoryContextSwitchTo (old_cxt );
2087
2087
2088
2088
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2089
- "jsonb_array_elements temporary cxt" ,
2089
+ JSONB "_array_elements temporary cxt" ,
2090
2090
ALLOCSET_DEFAULT_SIZES );
2091
2091
2092
2092
it = JsonbIteratorInit (& jb -> root );
@@ -2348,13 +2348,13 @@ elements_scalar(void *state, char *token, JsonTokenType tokentype)
2348
2348
Datum
2349
2349
jsonb_populate_record (PG_FUNCTION_ARGS )
2350
2350
{
2351
- return populate_record_worker (fcinfo ,"jsonb_populate_record " , true);
2351
+ return populate_record_worker (fcinfo ,JSONB "_populate_record " , true);
2352
2352
}
2353
2353
2354
2354
Datum
2355
2355
jsonb_to_record (PG_FUNCTION_ARGS )
2356
2356
{
2357
- return populate_record_worker (fcinfo ,"jsonb_to_record " , false);
2357
+ return populate_record_worker (fcinfo ,JSONB "_to_record " , false);
2358
2358
}
2359
2359
2360
2360
#ifndef JSON_GENERIC
@@ -3491,13 +3491,13 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype)
3491
3491
Datum
3492
3492
jsonb_populate_recordset (PG_FUNCTION_ARGS )
3493
3493
{
3494
- return populate_recordset_worker (fcinfo ,"jsonb_populate_recordset " , true);
3494
+ return populate_recordset_worker (fcinfo ,JSONB "_populate_recordset " , true);
3495
3495
}
3496
3496
3497
3497
Datum
3498
3498
jsonb_to_recordset (PG_FUNCTION_ARGS )
3499
3499
{
3500
- return populate_recordset_worker (fcinfo ,"jsonb_to_recordset " , false);
3500
+ return populate_recordset_worker (fcinfo ,JSONB "_to_recordset " , false);
3501
3501
}
3502
3502
3503
3503
#ifndef JSON_GENERIC
@@ -4594,7 +4594,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
4594
4594
*/
4595
4595
ereport (ERROR ,
4596
4596
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4597
- errmsg ("invalid concatenation ofjsonb objects" )));
4597
+ errmsg ("invalid concatenation of" JSONB " objects" )));
4598
4598
}
4599
4599
4600
4600
return res ;
@@ -4697,7 +4697,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
4697
4697
ereport (ERROR ,
4698
4698
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4699
4699
errmsg ("cannot replace existing key" ),
4700
- errhint ("Try using the functionjsonb_set "
4700
+ errhint ("Try using the function" JSONB "_set "
4701
4701
"to replace key value." )));
4702
4702
4703
4703
r = JsonbIteratorNext (it ,& v , true);/* skip value */