497 bool skipNested =
false;
498 JsonbIteratorToken
r;
501 if (!JB_ROOT_IS_OBJECT(jb))
504 it = JsonbIteratorInit(&jb->root);
506 while ((r = JsonbIteratorNext(&it, &v, skipNested)) != WJB_DONE) {
509 if (r == WJB_KEY && v.type != jbvNull) {
511 key = palloc(v.val.string.len + 1 *
sizeof(
char));
512 memcpy(key, v.val.string.val, v.val.string.len);
513 key[v.val.string.len] =
'\0';
518 tags = repalloc(tags, newSize * 2 *
sizeof(*tags));
522 r = JsonbIteratorNext(&it, &v, skipNested);
524 if (v.type == jbvString) {
526 value = palloc(v.val.string.len + 1 *
sizeof(
char));
527 memcpy(value, v.val.string.val, v.val.string.len);
528 value[v.val.string.len] =
'\0';
531 }
else if (v.type == jbvBool) {
533 bool_values_hash, bool_value,
sizeof(protobuf_c_boolean));
535 }
else if (v.type == jbvNumeric) {
537 str = DatumGetCString(DirectFunctionCall1(numeric_out,
538 PointerGetDatum(v.val.numeric)));
539 double d = strtod(str, NULL);
540 long l = strtol(str, NULL, 10);
543 double_value,
sizeof(
double));
static uint32_t add_key(struct mvt_agg_context *ctx, char *name)
static void add_value_as_string(struct mvt_agg_context *ctx, char *value, uint32_t *tags, uint32_t k)
static uint32_t get_key_index(struct mvt_agg_context *ctx, char *name)
#define MVT_PARSE_VALUE(value, kvtype, hash, valuefield, size)
#define MVT_PARSE_INT_VALUE(value)