summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2016-06-29 19:07:19 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2016-06-29 19:07:19 -0400
commit3154e16737ad17b2c63529e3df627bb5eb3bb3be (patch)
treeec0e89d9276bd6ff7053b79d27ad4ce8e5b1dd31
parent8ebb69f85445177575684a0ba5cfedda8d840a91 (diff)
downloadpostgresql-3154e16737ad17b2c63529e3df627bb5eb3bb3be.tar.gz
Dodge compiler bug in Visual Studio 2013.
VS2013 apparently has a problem with taking the address of a formal parameter in some cases. We do that elsewhere without trouble, but in this case the address is being passed to a subroutine that will probably get inlined, so maybe the combination of those things is what tickles the bug. Anyway, introducing an extra copy of the parameter value is enough to work around it. Per trouble report from Umair Shahid. Report: <CAM184AcjqKYZSdQqBHDrnENXHhW=mXbUC46QYPJ=nAh0gUHCGA@mail.gmail.com>
-rw-r--r--src/backend/optimizer/path/costsize.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 8c1dcccf9b..c4422fe986 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -3914,8 +3914,10 @@ calc_joinrel_size_estimate(PlannerInfo *root,
double outer_rows,
double inner_rows,
SpecialJoinInfo *sjinfo,
- List *restrictlist)
+ List *restrictlist_in)
{
+ /* This apparently-useless variable dodges a compiler bug in VS2013: */
+ List *restrictlist = restrictlist_in;
JoinType jointype = sjinfo->jointype;
Selectivity fkselec;
Selectivity jselec;