Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e6eb0d

Browse files
committed
Fix division by zero in the new range type histogram creation.
Report and analysis by Matthias.
1 parenta66fca3 commit3e6eb0d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/utils/adt/rangetypes_typanalyze.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
158158
/* Must copy the target values into anl_context */
159159
old_cxt=MemoryContextSwitchTo(stats->anl_context);
160160

161-
if (non_empty_cnt>0)
161+
/*
162+
* Generate a histogram slot entry if there are at least two values.
163+
*/
164+
if (non_empty_cnt >=2)
162165
{
163166
/* Sort bound values */
164167
qsort_arg(lowers,non_empty_cnt,sizeof(RangeBound),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp