mirror of https://github.com/postgres/postgres
Add sanity check of query
This commit is contained in:
parent
90456d1303
commit
1dd6bd19fa
|
@ -303,7 +303,8 @@ calc_rank_or(float *w, tsvector * t, QUERYTYPE * q)
|
|||
*/
|
||||
res = res + ( wjm + resj - wjm/((jm+1)*(jm+1)))/1.64493406685;
|
||||
}
|
||||
res = res /size;
|
||||
if ( size > 0 )
|
||||
res = res /size;
|
||||
pfree(item);
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue