Skip to content

Commit ac7e6a0

Browse files
committed
Fix incorrectly reported stats kind in "can't happen" ERROR
The error message(s) were reporting the stats kind of 'f', which is not correct as that's for the "dependencies" statistics kind. Reported-by: Horst Reiterer Reviewed-by: Richard Guo Discussion: https://postgr.es/m/18375-ba99383eb9062d6a@postgresql.org Backpatch-through: 12, where MCV extended stats were added.
1 parent b78f4d2 commit ac7e6a0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/statistics/extended_stats.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2467,7 +2467,7 @@ statext_expressions_load(Oid stxoid, bool inh, int idx)
24672467
if (isnull)
24682468
elog(ERROR,
24692469
"requested statistics kind \"%c\" is not yet built for statistics object %u",
2470-
STATS_EXT_DEPENDENCIES, stxoid);
2470+
STATS_EXT_EXPRESSIONS, stxoid);
24712471

24722472
eah = DatumGetExpandedArray(value);
24732473

src/backend/statistics/mcv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ statext_mcv_load(Oid mvoid, bool inh)
576576
if (isnull)
577577
elog(ERROR,
578578
"requested statistics kind \"%c\" is not yet built for statistics object %u",
579-
STATS_EXT_DEPENDENCIES, mvoid);
579+
STATS_EXT_MCV, mvoid);
580580

581581
result = statext_mcv_deserialize(DatumGetByteaP(mcvlist));
582582

0 commit comments

Comments
 (0)