aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Gierth <rhodiumtoad@postgresql.org>2017-04-03 23:30:24 +0100
committerAndrew Gierth <rhodiumtoad@postgresql.org>2017-04-03 23:30:24 +0100
commitf5780935266bd72951c770396f9267366414d1b9 (patch)
treec919fd59c3715c10094a83beebb947df59fd112e /src
parent9fa6e08d4a16f9b0461743cff35781e16308c106 (diff)
downloadpostgresql-f5780935266bd72951c770396f9267366414d1b9.tar.gz
postgresql-f5780935266bd72951c770396f9267366414d1b9.zip
Try and silence spurious Coverity warning.
gset_data (aka gd) in planner.c is always non-null if and only if parse->groupingSets is non-null, but Coverity doesn't know that and complains. Feed it an assertion to see if that keeps it happy.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/plan/planner.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
index f99257b5993..9d1a98220a7 100644
--- a/src/backend/optimizer/plan/planner.c
+++ b/src/backend/optimizer/plan/planner.c
@@ -3362,6 +3362,8 @@ get_number_of_groups(PlannerInfo *root,
ListCell *lc;
ListCell *lc2;
+ Assert(gd); /* keep Coverity happy */
+
dNumGroups = 0;
foreach(lc, gd->rollups)