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

Commit 1777de8

Browse files
author
Nikita Glukhov
committed
Use get_typlenbyvalalign() for JSONB
1 parent 3c73ba8 commit 1777de8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/utils/adt/jsonb_typanalyze.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,11 +1327,11 @@ compute_json_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
13271327
jsonAnalyzeMakeStats(&ctx, &stats->numvalues[empty_slot]);
13281328

13291329
/* We are storing jsonb values */
1330-
/* XXX Could the parameters be different on other platforms? */
13311330
stats->statypid[empty_slot] = JSONBOID;
1332-
stats->statyplen[empty_slot] = -1;
1333-
stats->statypbyval[empty_slot] = false;
1334-
stats->statypalign[empty_slot] = 'i';
1331+
get_typlenbyvalalign(stats->statypid[empty_slot],
1332+
&stats->statyplen[empty_slot],
1333+
&stats->statypbyval[empty_slot],
1334+
&stats->statypalign[empty_slot]);
13351335
}
13361336
}
13371337

0 commit comments

Comments
 (0)