556 bool skipNested =
false;
557 JsonbIteratorToken
r;
560 if (!JB_ROOT_IS_OBJECT(jb))
563 it = JsonbIteratorInit(&jb->root);
565 while ((
r = JsonbIteratorNext(&it, &v, skipNested)) != WJB_DONE)
569 if (
r == WJB_KEY && v.type != jbvNull)
578 key = palloc(v.val.string.len + 1);
579 memcpy(key, v.val.string.val, v.val.string.len);
580 key[v.val.string.len] =
'\0';
582 tags = repalloc(tags, newSize * 2 *
sizeof(*tags));
586 r = JsonbIteratorNext(&it, &v, skipNested);
588 if (v.type == jbvString)
591 value = palloc(v.val.string.len + 1);
592 memcpy(
value, v.val.string.val, v.val.string.len);
593 value[v.val.string.len] =
'\0';
597 else if (v.type == jbvBool)
600 bool_values_hash, bool_value,
sizeof(protobuf_c_boolean));
603 else if (v.type == jbvNumeric)
608 str = DatumGetCString(DirectFunctionCall1(numeric_out,
609 PointerGetDatum(v.val.numeric)));
610 d = strtod(str, NULL);
611 l = strtol(str, NULL, 10);
615 double_value,
sizeof(
double));
static uint32_t get_key_index_with_size(mvt_agg_context *ctx, const char *name, size_t size)
#define MVT_PARSE_INT_VALUE(value)
static uint32_t add_key(mvt_agg_context *ctx, char *name)
static void add_value_as_string(mvt_agg_context *ctx, char *value, uint32_t *tags, uint32_t k)
#define MVT_PARSE_VALUE(value, kvtype, hash, valuefield, size)