projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fa6e08
)
Try and silence spurious Coverity warning.
author
Andrew Gierth
Mon, 3 Apr 2017 22:30:24 +0000
(23:30 +0100)
committer
Andrew Gierth
Mon, 3 Apr 2017 22:30:24 +0000
(23:30 +0100)
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.
src/backend/optimizer/plan/planner.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/optimizer/plan/planner.c
b/src/backend/optimizer/plan/planner.c
index f99257b59939bc1c23eaa0423a869e7562eff028..9d1a98220a7fce62bae6101cb845d05bf2602956 100644
(file)
--- 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)