Remove set-but-not-used variable.
authorTom Lane <[email protected]>
Sat, 12 Sep 2015 15:11:08 +0000 (11:11 -0400)
committerTom Lane <[email protected]>
Sat, 12 Sep 2015 15:11:08 +0000 (11:11 -0400)
In branches before 9.3, commit 8703059c6 caused join_is_legal()'s
unique_ified variable to become unused, since its only remaining
use is for LATERAL-related tests which don't exist pre-9.3.
My compiler didn't complain about that, but Peter's does.

src/backend/optimizer/path/joinrels.c

index e8fa981dea73bb30d86f0e598edb51c855575c89..e989840029b4c2e349cca92255f5d76f22507af1 100644 (file)
@@ -327,7 +327,6 @@ join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
 {
    SpecialJoinInfo *match_sjinfo;
    bool        reversed;
-   bool        unique_ified;
    bool        must_be_leftjoin;
    ListCell   *l;
 
@@ -345,7 +344,6 @@ join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
     */
    match_sjinfo = NULL;
    reversed = false;
-   unique_ified = false;
    must_be_leftjoin = false;
 
    foreach(l, root->join_info_list)
@@ -447,7 +445,6 @@ join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
                return false;   /* invalid join path */
            match_sjinfo = sjinfo;
            reversed = false;
-           unique_ified = true;
        }
        else if (sjinfo->jointype == JOIN_SEMI &&
                 bms_equal(sjinfo->syn_righthand, rel1->relids) &&
@@ -459,7 +456,6 @@ join_is_legal(PlannerInfo *root, RelOptInfo *rel1, RelOptInfo *rel2,
                return false;   /* invalid join path */
            match_sjinfo = sjinfo;
            reversed = true;
-           unique_ified = true;
        }
        else
        {