Skip to content

Commit 2f8b400

Browse files
author
Richard Guo
committed
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. bf2a691 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/b3880f22-5808-4206-88d4-1553a81c3440@tantorlabs.com
1 parent c758119 commit 2f8b400

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/statistics/extended_stats.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ typedef struct StatExtEntry
7474

7575

7676
static List *fetch_statentries_for_relation(Relation pg_statext, Oid relid);
77-
static VacAttrStats **lookup_var_attr_stats(Relation rel, Bitmapset *attrs, List *exprs,
77+
static VacAttrStats **lookup_var_attr_stats(Bitmapset *attrs, List *exprs,
7878
int nvacatts, VacAttrStats **vacatts);
7979
static void statext_store(Oid statOid, bool inh,
8080
MVNDistinct *ndistinct, MVDependencies *dependencies,
@@ -165,7 +165,7 @@ BuildRelationExtStatistics(Relation onerel, bool inh, double totalrows,
165165
* Check if we can build these stats based on the column analyzed. If
166166
* not, report this fact (except in autovacuum) and move on.
167167
*/
168-
stats = lookup_var_attr_stats(onerel, stat->columns, stat->exprs,
168+
stats = lookup_var_attr_stats(stat->columns, stat->exprs,
169169
natts, vacattrstats);
170170
if (!stats)
171171
{
@@ -293,7 +293,7 @@ ComputeExtStatisticsRows(Relation onerel,
293293
* analyzed. If not, ignore it (don't report anything, we'll do that
294294
* during the actual build BuildRelationExtStatistics).
295295
*/
296-
stats = lookup_var_attr_stats(onerel, stat->columns, stat->exprs,
296+
stats = lookup_var_attr_stats(stat->columns, stat->exprs,
297297
natts, vacattrstats);
298298

299299
if (!stats)
@@ -687,7 +687,7 @@ examine_expression(Node *expr, int stattarget)
687687
* indicate to the caller that the stats should not be built.
688688
*/
689689
static VacAttrStats **
690-
lookup_var_attr_stats(Relation rel, Bitmapset *attrs, List *exprs,
690+
lookup_var_attr_stats(Bitmapset *attrs, List *exprs,
691691
int nvacatts, VacAttrStats **vacatts)
692692
{
693693
int i = 0;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy