@@ -589,12 +589,12 @@ jsonb_object_keys(PG_FUNCTION_ARGS)
589589 ereport (ERROR ,
590590 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
591591 errmsg ("cannot call %s on a scalar" ,
592- "jsonb_object_keys " )));
592+ JSONB "_object_keys " )));
593593 else if (JB_ROOT_IS_ARRAY (jb ))
594594 ereport (ERROR ,
595595 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
596596 errmsg ("cannot call %s on an array" ,
597- "jsonb_object_keys " )));
597+ JSONB "_object_keys " )));
598598
599599 funcctx = SRF_FIRSTCALL_INIT ();
600600 oldcontext = MemoryContextSwitchTo (funcctx -> multi_call_memory_ctx );
@@ -1601,7 +1601,7 @@ get_jsonb_path_all(FunctionCallInfo fcinfo, bool as_text)
16011601 /* Container must be array, but make sure */
16021602
16031603 if (!JsonContainerIsArray (container ))
1604- elog (ERROR , "not a jsonb array" );
1604+ elog (ERROR , "not a " JSONB " array" );
16051605
16061606 nelements = JsonContainerSize (container ) >= 0 ?
16071607 JsonContainerSize (container ) :
@@ -1815,7 +1815,7 @@ json_each(PG_FUNCTION_ARGS)
18151815Datum
18161816jsonb_each (PG_FUNCTION_ARGS )
18171817{
1818- return each_worker_jsonb (fcinfo , "jsonb_each " , false);
1818+ return each_worker_jsonb (fcinfo , JSONB "_each " , false);
18191819}
18201820
18211821#ifndef JSON_GENERIC
@@ -1829,7 +1829,7 @@ json_each_text(PG_FUNCTION_ARGS)
18291829Datum
18301830jsonb_each_text (PG_FUNCTION_ARGS )
18311831{
1832- return each_worker_jsonb (fcinfo , "jsonb_each_text " , true);
1832+ return each_worker_jsonb (fcinfo , JSONB "_each_text " , true);
18331833}
18341834
18351835static Datum
@@ -1882,7 +1882,7 @@ each_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname, bool as_text)
18821882 MemoryContextSwitchTo (old_cxt );
18831883
18841884 tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
1885- "jsonb_each temporary cxt" ,
1885+ JSONB "_each temporary cxt" ,
18861886 ALLOCSET_DEFAULT_SIZES );
18871887
18881888 it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2121,13 +2121,13 @@ each_scalar(void *state, char *token, JsonTokenType tokentype)
21212121Datum
21222122jsonb_array_elements (PG_FUNCTION_ARGS )
21232123{
2124- return elements_worker_jsonb (fcinfo , "jsonb_array_elements " , false);
2124+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements " , false);
21252125}
21262126
21272127Datum
21282128jsonb_array_elements_text (PG_FUNCTION_ARGS )
21292129{
2130- return elements_worker_jsonb (fcinfo , "jsonb_array_elements_text " , true);
2130+ return elements_worker_jsonb (fcinfo , JSONB "_array_elements_text " , true);
21312131}
21322132
21332133static Datum
@@ -2181,7 +2181,7 @@ elements_worker_jsonb(FunctionCallInfo fcinfo, const char *funcname,
21812181 MemoryContextSwitchTo (old_cxt );
21822182
21832183 tmp_cxt = AllocSetContextCreate (CurrentMemoryContext ,
2184- "jsonb_array_elements temporary cxt" ,
2184+ JSONB "_array_elements temporary cxt" ,
21852185 ALLOCSET_DEFAULT_SIZES );
21862186
21872187 it = JsonbIteratorInit (JsonbRoot (jb ));
@@ -2425,14 +2425,14 @@ elements_scalar(void *state, char *token, JsonTokenType tokentype)
24252425Datum
24262426jsonb_populate_record (PG_FUNCTION_ARGS )
24272427{
2428- return populate_record_worker (fcinfo , "jsonb_populate_record " ,
2428+ return populate_record_worker (fcinfo , JSONB "_populate_record " ,
24292429 JSONXOID == JSONOID , true);
24302430}
24312431
24322432Datum
24332433jsonb_to_record (PG_FUNCTION_ARGS )
24342434{
2435- return populate_record_worker (fcinfo , "jsonb_to_record " ,
2435+ return populate_record_worker (fcinfo , JSONB "_to_record " ,
24362436 JSONXOID == JSONOID , false);
24372437}
24382438
@@ -3673,14 +3673,14 @@ hash_scalar(void *state, char *token, JsonTokenType tokentype)
36733673Datum
36743674jsonb_populate_recordset (PG_FUNCTION_ARGS )
36753675{
3676- return populate_recordset_worker (fcinfo , "jsonb_populate_recordset " ,
3676+ return populate_recordset_worker (fcinfo , JSONB "_populate_recordset " ,
36773677 false, true);
36783678}
36793679
36803680Datum
36813681jsonb_to_recordset (PG_FUNCTION_ARGS )
36823682{
3683- return populate_recordset_worker (fcinfo , "jsonb_to_recordset " ,
3683+ return populate_recordset_worker (fcinfo , JSONB "_to_recordset " ,
36843684 false, false);
36853685}
36863686
@@ -4883,7 +4883,7 @@ IteratorConcat(JsonbIterator **it1, JsonbIterator **it2,
48834883 */
48844884 ereport (ERROR ,
48854885 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
4886- errmsg ("invalid concatenation of jsonb objects" )));
4886+ errmsg ("invalid concatenation of " JSONB " objects" )));
48874887 }
48884888
48894889 return res ;
@@ -4986,7 +4986,7 @@ setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls,
49864986 ereport (ERROR ,
49874987 (errcode (ERRCODE_INVALID_PARAMETER_VALUE ),
49884988 errmsg ("cannot replace existing key" ),
4989- errhint ("Try using the function jsonb_set "
4989+ errhint ("Try using the function " JSONB "_set "
49904990 "to replace key value." )));
49914991
49924992 r = JsonbIteratorNext (it , & v , true); /* skip value */
0 commit comments