summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guo2025-01-07 02:24:14 +0000
committerRichard Guo2025-01-07 02:24:14 +0000
commit2f8b4007dbbac5aa9605414974c802e415176df4 (patch)
tree3c2d8b150d58937004c8e20510d06ec6afdc8913
parentc758119e5bfb47b38cf957f9a5a37ceae96fa9b3 (diff)
Remove unused parameter in lookup_var_attr_stats
The parameter 'rel' in lookup_var_attr_stats was once used to draw an ERROR when ANALYZE failed to acquire sufficient data to build extended statistics. bf2a691e0 changed the logic to raise a WARNING in the caller instead. As a result, this parameter is no longer needed and can be removed. Since this is a static function, we can always easily reintroduce the parameter if it's ever needed in the future. Author: Ilia Evdokimov Reviewed-by: Fabrízio de Royes Mello Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/backend/statistics/extended_stats.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index aeec3ece41b..34dcb535e18 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -74,7 +74,7 @@ typedef struct StatExtEntry
static List *fetch_statentries_for_relation(Relation pg_statext, Oid relid);
-static VacAttrStats **lookup_var_attr_stats(Relation rel, Bitmapset *attrs, List *exprs,
+static VacAttrStats **lookup_var_attr_stats(Bitmapset *attrs, List *exprs,
int nvacatts, VacAttrStats **vacatts);
static void statext_store(Oid statOid, bool inh,
MVNDistinct *ndistinct, MVDependencies *dependencies,
@@ -165,7 +165,7 @@ BuildRelationExtStatistics(Relation onerel, bool inh, double totalrows,
* Check if we can build these stats based on the column analyzed. If
* not, report this fact (except in autovacuum) and move on.
*/
- stats = lookup_var_attr_stats(onerel, stat->columns, stat->exprs,
+ stats = lookup_var_attr_stats(stat->columns, stat->exprs,
natts, vacattrstats);
if (!stats)
{
@@ -293,7 +293,7 @@ ComputeExtStatisticsRows(Relation onerel,
* analyzed. If not, ignore it (don't report anything, we'll do that
* during the actual build BuildRelationExtStatistics).
*/
- stats = lookup_var_attr_stats(onerel, stat->columns, stat->exprs,
+ stats = lookup_var_attr_stats(stat->columns, stat->exprs,
natts, vacattrstats);
if (!stats)
@@ -687,7 +687,7 @@ examine_expression(Node *expr, int stattarget)
* indicate to the caller that the stats should not be built.
*/
static VacAttrStats **
-lookup_var_attr_stats(Relation rel, Bitmapset *attrs, List *exprs,
+lookup_var_attr_stats(Bitmapset *attrs, List *exprs,
int nvacatts, VacAttrStats **vacatts)
{
int i = 0;