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

Commit 08b9002

Browse files
author
Nikita Glukhov
committed
Fix XXX comment about JsonAnalyzeContext.maxdepth
1 parent a060f12 commit 08b9002

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ jsonAnalyzeAddPath(JsonAnalyzeContext *ctx, JsonPath parent,
292292
stats->entries = NULL;
293293
stats->nentries = 0;
294294

295-
/* XXX Seems strange. Should we even add the path in this case? */
296-
if (stats->depth > ctx->maxdepth)
295+
/* update maximal depth */
296+
if (ctx->maxdepth < stats->depth)
297297
ctx->maxdepth = stats->depth;
298298
}
299299

0 commit comments

Comments
 (0)