Skip to content

Commit 4e1ee79

Browse files
committed
Fix typalign in rangetypes statistics
6df7a96 introduces multirange types, whose typanalyze function shares infrastructure with range types typanalyze function. Since 6df7a96, information about type gathered by statistics is filled from typcache. But typalign is mistakenly always set to double. This commit fixes this oversight.
1 parent eea1e08 commit 4e1ee79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/utils/adt/rangetypes_typanalyze.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
330330
stats->statypid[slot_idx] = typcache->type_id;
331331
stats->statyplen[slot_idx] = typcache->typlen;
332332
stats->statypbyval[slot_idx] = typcache->typbyval;
333-
stats->statypalign[slot_idx] = 'd';
333+
stats->statypalign[slot_idx] = typcache->typalign;
334334

335335
slot_idx++;
336336
}

0 commit comments

Comments
 (0)