summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Korotkov2020-12-20 21:26:13 +0000
committerAlexander Korotkov2020-12-20 21:31:11 +0000
commit4e1ee79e3182256d9c8ddbc1ce9c4e8419c611ff (patch)
treecf382e1820a1374cdef6414d3eee18f10d8e7237 /src
parenteea1e08cfc95bb7e1b7e9f515e73cf75adf147e3 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/rangetypes_typanalyze.c2
1 files changed, 1 insertions, 1 deletions
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++;
}