postgres.git / summary / log / commit / refs
commit 4e1ee79e3182256d9c8ddbc1ce9c4e8419c611ff
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: Sun Dec 20 21:26:13 2020 +0000
First released in: 14.0
Fix typalign in rangetypes statistics
6df7a9698b introduces multirange types, whose typanalyze function shares
infrastructure with range types typanalyze function. Since 6df7a9698b,
information about type gathered by statistics is filled from typcache.
But typalign is mistakenly always set to double. This commit fixes this
oversight.
src/backend/utils/adt/rangetypes_typanalyze.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c
index 1376cf06940..d5fa36b6ff0 100644
--- a/src/backend/utils/adt/rangetypes_typanalyze.c
+++ b/src/backend/utils/adt/rangetypes_typanalyze.c
@@ -330,7 +330,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
stats->statypid[slot_idx] = typcache->type_id;
stats->statyplen[slot_idx] = typcache->typlen;
stats->statypbyval[slot_idx] = typcache->typbyval;
- stats->statypalign[slot_idx] = 'd';
+ stats->statypalign[slot_idx] = typcache->typalign;
slot_idx++;
}
[parent: eea1e08cfc95]