@@ -589,12 +589,12 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
589
589
ereport (ERROR ,
590
590
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
591
591
errmsg ("cannot call %s on a scalar" ,
592
- "jsonb_object_keys " )));
592
+ JSONB "_object_keys " )));
593
593
else if (JB_ROOT_IS_ARRAY (jb ))
594
594
ereport (ERROR ,
595
595
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
596
596
errmsg ("cannot call %s on an array" ,
597
- "jsonb_object_keys " )));
597
+ JSONB "_object_keys " )));
598
598
599
599
funcctx = SRF_FIRSTCALL_INIT ();
600
600
oldcontext = MemoryContextSwitchTo (funcctx -> multi_call_memory_ctx );
@@ -1601,7 +1601,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text)
1601
1601
/* Container must be array, but make sure */
1602
1602
1603
1603
if (!JsonContainerIsArray (container ))
1604
- elog (ERROR ,"not ajsonb array" );
1604
+ elog (ERROR ,"not a" JSONB " array" );
1605
1605
1606
1606
nelements = JsonContainerSize (container ) >=0 ?
1607
1607
JsonContainerSize (container ) :
@@ -1815,7 +1815,7 @@ json_each(PG_FUNCTION_ARGS)
1815
1815
Datum
1816
1816
jsonb_each (PG_FUNCTION_ARGS )
1817
1817
{
1818
- return each_worker_jsonb (fcinfo ,"jsonb_each " , false);
1818
+ return each_worker_jsonb (fcinfo ,JSONB "_each " , false);
1819
1819
}
1820
1820
1821
1821
#ifndef JSON_GENERIC
@@ -1829,7 +1829,7 @@ json_each_text(PG_FUNCTION_ARGS)
1829
1829
Datum
1830
1830
jsonb_each_text (PG_FUNCTION_ARGS )
1831
1831
{
1832
- return each_worker_jsonb (fcinfo ,"jsonb_each_text " , true);
1832
+ return each_worker_jsonb (fcinfo ,JSONB "_each_text " , true);
1833
1833
}
1834
1834
1835
1835
static Datum
@@ -1882,7 +1882,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
1882
1882
MemoryContextSwitchTo (old_cxt );
1883
1883
1884
1884
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
1885
- "jsonb_each temporary cxt" ,
1885
+ JSONB "_each temporary cxt" ,
1886
1886
ALLOCSET_DEFAULT_SIZES );
1887
1887
1888
1888
it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2121,13 +2121,13 @@ each_scalar(void *state, char *token, JsonTokenType tokentype)
2121
2121
Datum
2122
2122
jsonb_array_elements (PG_FUNCTION_ARGS )
2123
2123
{
2124
- return elements_worker_jsonb (fcinfo ,"jsonb_array_elements " , false);
2124
+ return elements_worker_jsonb (fcinfo ,JSONB "_array_elements " , false);
2125
2125
}
2126
2126
2127
2127
Datum
2128
2128
jsonb_array_elements_text (PG_FUNCTION_ARGS )
2129
2129
{
2130
- return elements_worker_jsonb (fcinfo ,"jsonb_array_elements_text " , true);
2130
+ return elements_worker_jsonb (fcinfo ,JSONB "_array_elements_text " , true);
2131
2131
}
2132
2132
2133
2133
static Datum
@@ -2181,7 +2181,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
2181
2181
MemoryContextSwitchTo (old_cxt );
2182
2182
2183
2183
tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2184
- "jsonb_array_elements temporary cxt" ,
2184
+ JSONB "_array_elements temporary cxt" ,
2185
2185
ALLOCSET_DEFAULT_SIZES );
2186
2186
2187
2187
it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2425,14 +2425,14 @@ elements_scalar(void *state, char *token, JsonTokenType tokentype)
2425
2425
Datum
2426
2426
jsonb_populate_record (PG_FUNCTION_ARGS )
2427
2427
{
2428
- return populate_record_worker (fcinfo ,"jsonb_populate_record " ,
2428
+ return populate_record_worker (fcinfo ,JSONB "_populate_record " ,
2429
2429
JSONXOID == JSONOID , true);
2430
2430
}
2431
2431
2432
2432
Datum
2433
2433
jsonb_to_record (PG_FUNCTION_ARGS )
2434
2434
{
2435
- return populate_record_worker (fcinfo ,"jsonb_to_record " ,
2435
+ return populate_record_worker (fcinfo ,JSONB "_to_record " ,
2436
2436
JSONXOID == JSONOID , false);
2437
2437
}
2438
2438
@@ -3673,14 +3673,14 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype)
3673
3673
Datum
3674
3674
jsonb_populate_recordset (PG_FUNCTION_ARGS )
3675
3675
{
3676
- return populate_recordset_worker (fcinfo ,"jsonb_populate_recordset " ,
3676
+ return populate_recordset_worker (fcinfo ,JSONB "_populate_recordset " ,
3677
3677
false, true);
3678
3678
}
3679
3679
3680
3680
Datum
3681
3681
jsonb_to_recordset (PG_FUNCTION_ARGS )
3682
3682
{
3683
- return populate_recordset_worker (fcinfo ,"jsonb_to_recordset " ,
3683
+ return populate_recordset_worker (fcinfo ,JSONB "_to_recordset " ,
3684
3684
false, false);
3685
3685
}
3686
3686
@@ -4883,7 +4883,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
4883
4883
*/
4884
4884
ereport (ERROR ,
4885
4885
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4886
- errmsg ("invalid concatenation ofjsonb objects" )));
4886
+ errmsg ("invalid concatenation of" JSONB " objects" )));
4887
4887
}
4888
4888
4889
4889
return res ;
@@ -4986,7 +4986,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
4986
4986
ereport (ERROR ,
4987
4987
(errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4988
4988
errmsg ("cannot replace existing key" ),
4989
- errhint ("Try using the functionjsonb_set "
4989
+ errhint ("Try using the function" JSONB "_set "
4990
4990
"to replace key value." )));
4991
4991
4992
4992
r = JsonbIteratorNext (it ,& v , true);/* skip value */