summaryrefslogtreecommitdiff
path: root/src/backend/statistics
diff options
context:
space:
mode:
authorTom Lane2021-04-11 15:46:32 +0000
committerTom Lane2021-04-11 15:46:46 +0000
commit9cb92334092fa75afc62a71243bbc1f4612ecfa4 (patch)
tree07a4e36c0f8be1f857888a21817694d7aef7a9f5 /src/backend/statistics
parent81a23dd87999ec9fb62554328c69c5b678612d56 (diff)
Fix uninitialized variable from commit a4d75c86b.
The path for *exprs != NIL would misbehave, and likely crash, since pull_varattnos expects its last argument to be valid at call. Found by Coverity --- we have no coverage of this path in the regression tests.
Diffstat (limited to 'src/backend/statistics')
-rw-r--r--src/backend/statistics/extended_stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/statistics/extended_stats.c b/src/backend/statistics/extended_stats.c
index 4674168ff8..4bbd85f401 100644
--- a/src/backend/statistics/extended_stats.c
+++ b/src/backend/statistics/extended_stats.c
@@ -1609,7 +1609,7 @@ statext_is_compatible_clause(PlannerInfo *root, Node *clause, Index relid,
if (pg_class_aclcheck(rte->relid, userid, ACL_SELECT) != ACLCHECK_OK)
{
- Bitmapset *clause_attnums;
+ Bitmapset *clause_attnums = NULL;
/* Don't have table privilege, must check individual columns */
if (*exprs != NIL)