mirror of
https://github.com/postgres/postgres.git
synced 2025-06-07 11:02:12 +03:00
Remove unused totalrows parameter in compute_expr_stats
The totalrows parameter in compute_expr_stats is unused, so remove it. This is a static function, so the parameter can easily be added again if it's ever needed. Author: Ilia Evdokimov <ilya.evdokimov@tantorlabs.ru> Discussion: https://postgr.es/m/667b92d2-f953-4fcb-9377-3765f5b94187@tantorlabs.com
This commit is contained in:
parent
3f2d72b493
commit
61cac71c23
@ -89,9 +89,8 @@ typedef struct AnlExprData
|
|||||||
VacAttrStats *vacattrstat; /* statistics attrs to analyze */
|
VacAttrStats *vacattrstat; /* statistics attrs to analyze */
|
||||||
} AnlExprData;
|
} AnlExprData;
|
||||||
|
|
||||||
static void compute_expr_stats(Relation onerel, double totalrows,
|
static void compute_expr_stats(Relation onerel, AnlExprData *exprdata,
|
||||||
AnlExprData *exprdata, int nexprs,
|
int nexprs, HeapTuple *rows, int numrows);
|
||||||
HeapTuple *rows, int numrows);
|
|
||||||
static Datum serialize_expr_stats(AnlExprData *exprdata, int nexprs);
|
static Datum serialize_expr_stats(AnlExprData *exprdata, int nexprs);
|
||||||
static Datum expr_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
|
static Datum expr_fetch_func(VacAttrStatsP stats, int rownum, bool *isNull);
|
||||||
static AnlExprData *build_expr_data(List *exprs, int stattarget);
|
static AnlExprData *build_expr_data(List *exprs, int stattarget);
|
||||||
@ -220,9 +219,7 @@ BuildRelationExtStatistics(Relation onerel, bool inh, double totalrows,
|
|||||||
exprdata = build_expr_data(stat->exprs, stattarget);
|
exprdata = build_expr_data(stat->exprs, stattarget);
|
||||||
nexprs = list_length(stat->exprs);
|
nexprs = list_length(stat->exprs);
|
||||||
|
|
||||||
compute_expr_stats(onerel, totalrows,
|
compute_expr_stats(onerel, exprdata, nexprs, rows, numrows);
|
||||||
exprdata, nexprs,
|
|
||||||
rows, numrows);
|
|
||||||
|
|
||||||
exprstats = serialize_expr_stats(exprdata, nexprs);
|
exprstats = serialize_expr_stats(exprdata, nexprs);
|
||||||
}
|
}
|
||||||
@ -2107,8 +2104,7 @@ examine_opclause_args(List *args, Node **exprp, Const **cstp,
|
|||||||
* Compute statistics about expressions of a relation.
|
* Compute statistics about expressions of a relation.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
compute_expr_stats(Relation onerel, double totalrows,
|
compute_expr_stats(Relation onerel, AnlExprData *exprdata, int nexprs,
|
||||||
AnlExprData *exprdata, int nexprs,
|
|
||||||
HeapTuple *rows, int numrows)
|
HeapTuple *rows, int numrows)
|
||||||
{
|
{
|
||||||
MemoryContext expr_context,
|
MemoryContext expr_context,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user