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

Commit e02e7a5

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about manual recursion in jsonAnalyzeCollectPaths()
1 parent 033b18a commit e02e7a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,13 @@ jsonAnalyzeCollectPaths(JsonAnalyzeContext *ctx, Jsonb *jb, void *param)
478478
if (collect_values)
479479
jsonAnalyzeJsonValue(ctx, &stats->vstats, &jv);
480480

481-
/* XXX not sure why we're doing this? */
481+
/*
482+
* Manually recurse into container by creating child iterator.
483+
* We use skipNested=true to give jsonAnalyzeJsonValue()
484+
* ability to access jbvBinary containers.
485+
*/
482486
if (jv.type == jbvBinary)
483487
{
484-
/* recurse into container */
485488
JsonbIterator *it2 = JsonbIteratorInit(jv.val.binary.data);
486489

487490
it2->parent = it;

0 commit comments

Comments
 (0)