@@ -594,12 +594,12 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
594
594
ereport (ERROR ,
595
595
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
596
596
errmsg ("cannot call %s on a scalar" ,
597
- "jsonb_object_keys " )));
597
+ JSONB "_object_keys " )));
598
598
else if (JB_ROOT_IS_ARRAY (jb ))
599
599
ereport (ERROR ,
600
600
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
601
601
errmsg ("cannot call %s on an array" ,
602
- "jsonb_object_keys " )));
602
+ JSONB "_object_keys " )));
603
603
604
604
funcctx = SRF_FIRSTCALL_INIT ();
605
605
oldcontext = MemoryContextSwitchTo (funcctx -> multi_call_memory_ctx );
@@ -1610,7 +1610,7 @@ jsonb_get_element(Jsonb *jb, Datum *path, int npath, bool *isnull, bool as_text)
1610
1610
/* Container must be array, but make sure */
1611
1611
1612
1612
if (!JsonContainerIsArray (container ))
1613
- elog (ERROR , "not a jsonb array" );
1613
+ elog (ERROR , "not a " JSONB " array" );
1614
1614
1615
1615
nelements = JsonContainerSize (container ) >= 0 ?
1616
1616
JsonContainerSize (container ) :
@@ -1957,7 +1957,7 @@ json_each(PG_FUNCTION_ARGS)
1957
1957
Datum
1958
1958
jsonb_each (PG_FUNCTION_ARGS )
1959
1959
{
1960
- return each_worker_jsonb (fcinfo , "jsonb_each " , false);
1960
+ return each_worker_jsonb (fcinfo , JSONB "_each " , false);
1961
1961
}
1962
1962
1963
1963
#ifndef JSON_GENERIC
@@ -1971,7 +1971,7 @@ json_each_text(PG_FUNCTION_ARGS)
1971
1971
Datum
1972
1972
jsonb_each_text (PG_FUNCTION_ARGS )
1973
1973
{
1974
- return each_worker_jsonb (fcinfo , "jsonb_each_text " , true);
1974
+ return each_worker_jsonb (fcinfo , JSONB "_each_text " , true);
1975
1975
}
1976
1976
1977
1977
static Datum
@@ -2024,7 +2024,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
2024
2024
MemoryContextSwitchTo (old_cxt );
2025
2025
2026
2026
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2027
- "jsonb_each temporary cxt" ,
2027
+ JSONB "_each temporary cxt" ,
2028
2028
ALLOCSET_DEFAULT_SIZES );
2029
2029
2030
2030
it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2263,13 +2263,13 @@ each_scalar(void *state, char *token, JsonTokenType tokentype)
2263
2263
Datum
2264
2264
jsonb_array_elements (PG_FUNCTION_ARGS )
2265
2265
{
2266
- return elements_worker_jsonb (fcinfo , "jsonb_array_elements " , false);
2266
+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements " , false);
2267
2267
}
2268
2268
2269
2269
Datum
2270
2270
jsonb_array_elements_text (PG_FUNCTION_ARGS )
2271
2271
{
2272
- return elements_worker_jsonb (fcinfo , "jsonb_array_elements_text " , true);
2272
+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements_text " , true);
2273
2273
}
2274
2274
2275
2275
static Datum
@@ -2323,7 +2323,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
2323
2323
MemoryContextSwitchTo (old_cxt );
2324
2324
2325
2325
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2326
- "jsonb_array_elements temporary cxt" ,
2326
+ JSONB "_array_elements temporary cxt" ,
2327
2327
ALLOCSET_DEFAULT_SIZES );
2328
2328
2329
2329
it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2567,14 +2567,14 @@ elements_scalar(void *state, char *token, JsonTokenType tokentype)
2567
2567
Datum
2568
2568
jsonb_populate_record (PG_FUNCTION_ARGS )
2569
2569
{
2570
- return populate_record_worker (fcinfo , "jsonb_populate_record " ,
2570
+ return populate_record_worker (fcinfo , JSONB "_populate_record " ,
2571
2571
JSONXOID == JSONOID , true);
2572
2572
}
2573
2573
2574
2574
Datum
2575
2575
jsonb_to_record (PG_FUNCTION_ARGS )
2576
2576
{
2577
- return populate_record_worker (fcinfo , "jsonb_to_record " ,
2577
+ return populate_record_worker (fcinfo , JSONB "_to_record " ,
2578
2578
JSONXOID == JSONOID , false);
2579
2579
}
2580
2580
@@ -3814,14 +3814,14 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype)
3814
3814
Datum
3815
3815
jsonb_populate_recordset (PG_FUNCTION_ARGS )
3816
3816
{
3817
- return populate_recordset_worker (fcinfo , "jsonb_populate_recordset " ,
3817
+ return populate_recordset_worker (fcinfo , JSONB "_populate_recordset " ,
3818
3818
false, true);
3819
3819
}
3820
3820
3821
3821
Datum
3822
3822
jsonb_to_recordset (PG_FUNCTION_ARGS )
3823
3823
{
3824
- return populate_recordset_worker (fcinfo , "jsonb_to_recordset " ,
3824
+ return populate_recordset_worker (fcinfo , JSONB "_to_recordset " ,
3825
3825
false, false);
3826
3826
}
3827
3827
@@ -5134,7 +5134,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
5134
5134
ereport (ERROR ,
5135
5135
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
5136
5136
errmsg ("cannot replace existing key" ),
5137
- errhint ("Try using the function jsonb_set "
5137
+ errhint ("Try using the function " JSONB "_set "
5138
5138
"to replace key value." )));
5139
5139
5140
5140
r = JsonbIteratorNext (it , & v , true); /* skip value */
0 commit comments