@@ -594,12 +594,12 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
594594 ereport (ERROR ,
595595 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
596596 errmsg ("cannot call %s on a scalar" ,
597- "jsonb_object_keys " )));
597+ JSONB "_object_keys " )));
598598 else if (JB_ROOT_IS_ARRAY (jb ))
599599 ereport (ERROR ,
600600 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
601601 errmsg ("cannot call %s on an array" ,
602- "jsonb_object_keys " )));
602+ JSONB "_object_keys " )));
603603
604604 funcctx = SRF_FIRSTCALL_INIT ();
605605 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)
16101610 /* Container must be array, but make sure */
16111611
16121612 if (!JsonContainerIsArray (container ))
1613- elog (ERROR , "not a jsonb array" );
1613+ elog (ERROR , "not a " JSONB " array" );
16141614
16151615 nelements = JsonContainerSize (container ) >= 0 ?
16161616 JsonContainerSize (container ) :
@@ -1957,7 +1957,7 @@ json_each(PG_FUNCTION_ARGS)
19571957Datum
19581958jsonb_each (PG_FUNCTION_ARGS )
19591959{
1960- return each_worker_jsonb (fcinfo , "jsonb_each " , false);
1960+ return each_worker_jsonb (fcinfo , JSONB "_each " , false);
19611961}
19621962
19631963#ifndef JSON_GENERIC
@@ -1971,7 +1971,7 @@ json_each_text(PG_FUNCTION_ARGS)
19711971Datum
19721972jsonb_each_text (PG_FUNCTION_ARGS )
19731973{
1974- return each_worker_jsonb (fcinfo , "jsonb_each_text " , true);
1974+ return each_worker_jsonb (fcinfo , JSONB "_each_text " , true);
19751975}
19761976
19771977static Datum
@@ -2024,7 +2024,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
20242024 MemoryContextSwitchTo (old_cxt );
20252025
20262026 tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2027- "jsonb_each temporary cxt" ,
2027+ JSONB "_each temporary cxt" ,
20282028 ALLOCSET_DEFAULT_SIZES );
20292029
20302030 it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2263,13 +2263,13 @@ each_scalar(void *state, char *token, JsonTokenType tokentype)
22632263Datum
22642264jsonb_array_elements (PG_FUNCTION_ARGS )
22652265{
2266- return elements_worker_jsonb (fcinfo , "jsonb_array_elements " , false);
2266+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements " , false);
22672267}
22682268
22692269Datum
22702270jsonb_array_elements_text (PG_FUNCTION_ARGS )
22712271{
2272- return elements_worker_jsonb (fcinfo , "jsonb_array_elements_text " , true);
2272+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements_text " , true);
22732273}
22742274
22752275static Datum
@@ -2323,7 +2323,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
23232323 MemoryContextSwitchTo (old_cxt );
23242324
23252325 tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2326- "jsonb_array_elements temporary cxt" ,
2326+ JSONB "_array_elements temporary cxt" ,
23272327 ALLOCSET_DEFAULT_SIZES );
23282328
23292329 it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2567,14 +2567,14 @@ elements_scalar(void *state, char *token, JsonTokenType tokentype)
25672567Datum
25682568jsonb_populate_record (PG_FUNCTION_ARGS )
25692569{
2570- return populate_record_worker (fcinfo , "jsonb_populate_record " ,
2570+ return populate_record_worker (fcinfo , JSONB "_populate_record " ,
25712571 JSONXOID == JSONOID , true);
25722572}
25732573
25742574Datum
25752575jsonb_to_record (PG_FUNCTION_ARGS )
25762576{
2577- return populate_record_worker (fcinfo , "jsonb_to_record " ,
2577+ return populate_record_worker (fcinfo , JSONB "_to_record " ,
25782578 JSONXOID == JSONOID , false);
25792579}
25802580
@@ -3814,14 +3814,14 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype)
38143814Datum
38153815jsonb_populate_recordset (PG_FUNCTION_ARGS )
38163816{
3817- return populate_recordset_worker (fcinfo , "jsonb_populate_recordset " ,
3817+ return populate_recordset_worker (fcinfo , JSONB "_populate_recordset " ,
38183818 false, true);
38193819}
38203820
38213821Datum
38223822jsonb_to_recordset (PG_FUNCTION_ARGS )
38233823{
3824- return populate_recordset_worker (fcinfo , "jsonb_to_recordset " ,
3824+ return populate_recordset_worker (fcinfo , JSONB "_to_recordset " ,
38253825 false, false);
38263826}
38273827
@@ -5134,7 +5134,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
51345134 ereport (ERROR ,
51355135 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
51365136 errmsg ("cannot replace existing key" ),
5137- errhint ("Try using the function jsonb_set "
5137+ errhint ("Try using the function " JSONB "_set "
51385138 "to replace key value." )));
51395139
51405140 r = JsonbIteratorNext (it , & v , true); /* skip value */
0 commit comments