diff options
author | Alexander Korotkov <akorotkov@postgresql.org> | 2020-12-21 00:26:13 +0300 |
---|---|---|
committer | Alexander Korotkov <akorotkov@postgresql.org> | 2020-12-21 00:31:11 +0300 |
commit | 4e1ee79e3182256d9c8ddbc1ce9c4e8419c611ff (patch) | |
tree | cf382e1820a1374cdef6414d3eee18f10d8e7237 | |
parent | eea1e08cfc95bb7e1b7e9f515e73cf75adf147e3 (diff) | |
download | postgresql-4e1ee79e3182256d9c8ddbc1ce9c4e8419c611ff.tar.gz postgresql-4e1ee79e3182256d9c8ddbc1ce9c4e8419c611ff.zip |
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.
-rw-r--r-- | src/backend/utils/adt/rangetypes_typanalyze.c | 2 |
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++; } |