Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1eb5b4f

Browse files
author
Nikita Glukhov
committed
Remove JsonContainerExtractKeys()
1 parent 919bc93 commit 1eb5b4f

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

src/backend/utils/adt/json_generic.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -387,31 +387,3 @@ JsonCopyFlat(JsonContainer *jc)
387387

388388
return res;
389389
}
390-
391-
JsonValue *
392-
JsonContainerExtractKeys(JsonContainer *jsc)
393-
{
394-
JsonIterator *it;
395-
JsonbParseState *state = NULL;
396-
JsonValue *res = NULL;
397-
JsonValue val;
398-
JsonIteratorToken tok;
399-
400-
Assert(JsonContainerIsObject(jsc));
401-
402-
it = JsonIteratorInit(jsc);
403-
404-
while ((tok = JsonIteratorNext(&it, &val, false)) != WJB_DONE)
405-
{
406-
res = pushJsonbValue(&state, tok, tok < WJB_BEGIN_ARRAY ? &val : NULL);
407-
408-
if (tok == WJB_KEY)
409-
{
410-
tok = JsonIteratorNext(&it, &val, true);
411-
Assert(tok == WJB_VALUE);
412-
pushJsonbValueScalar(&state, tok, &val);
413-
}
414-
}
415-
416-
return res;
417-
}

src/include/utils/json_generic.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,6 @@ extern int JsonCompareContainers(JsonContainer *a, JsonContainer *b);
284284

285285
extern bool JsonbDeepContains(JsonContainer *val, JsonContainer *mContained);
286286

287-
extern JsonValue *JsonContainerExtractKeys(JsonContainer *jsc);
288-
289287
/* jsonb.c support functions */
290288
extern JsonValue *JsonValueFromCString(char *json, int len, bool unique_keys);
291289

0 commit comments

Comments
 (0)