Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9606619

Browse files
committed
Remove unnecessary check for jbvBinary in convertJsonbValue.
The check was confusing and is a condition that should never in facthappen.Per gripe from Dmitry Dolgov.
1 parent6680224 commit9606619

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎src/backend/utils/adt/jsonb_util.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,14 @@ convertJsonbValue(StringInfo buffer, JEntry *header, JsonbValue *val, int level)
13141314
if (!val)
13151315
return;
13161316

1317-
if (IsAJsonbScalar(val)||val->type==jbvBinary)
1317+
/*
1318+
* A JsonbValue passed as val should never have a type of jbvBinary,
1319+
* and neither should any of its sub-components. Those values will be
1320+
* produced by convertJsonbArray and convertJsonbObject, the results of
1321+
* which will not be passed back to this function as an argument.
1322+
*/
1323+
1324+
if (IsAJsonbScalar(val))
13181325
convertJsonbScalar(buffer,header,val);
13191326
elseif (val->type==jbvArray)
13201327
convertJsonbArray(buffer,header,val,level);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp