skewColType/skewColTypmod are no longer used in the wake of commit
9aab83fc5, and seem unlikely to be wanted in future, so let's drop 'em.
Discussion: https://postgr.es/m/16364.
1494520862@sss.pgh.pa.us
COPY_SCALAR_FIELD(skewTable);
COPY_SCALAR_FIELD(skewColumn);
COPY_SCALAR_FIELD(skewInherit);
- COPY_SCALAR_FIELD(skewColType);
- COPY_SCALAR_FIELD(skewColTypmod);
return newnode;
}
WRITE_OID_FIELD(skewTable);
WRITE_INT_FIELD(skewColumn);
WRITE_BOOL_FIELD(skewInherit);
- WRITE_OID_FIELD(skewColType);
- WRITE_INT_FIELD(skewColTypmod);
}
static void
READ_OID_FIELD(skewTable);
READ_INT_FIELD(skewColumn);
READ_BOOL_FIELD(skewInherit);
- READ_OID_FIELD(skewColType);
- READ_INT_FIELD(skewColTypmod);
READ_DONE();
}
static Hash *make_hash(Plan *lefttree,
Oid skewTable,
AttrNumber skewColumn,
- bool skewInherit,
- Oid skewColType,
- int32 skewColTypmod);
+ bool skewInherit);
static MergeJoin *make_mergejoin(List *tlist,
List *joinclauses, List *otherclauses,
List *mergeclauses,
Oid skewTable = InvalidOid;
AttrNumber skewColumn = InvalidAttrNumber;
bool skewInherit = false;
- Oid skewColType = InvalidOid;
- int32 skewColTypmod = -1;
/*
* HashJoin can project, so we don't have to demand exact tlists from the
skewTable = rte->relid;
skewColumn = var->varattno;
skewInherit = rte->inh;
- skewColType = var->vartype;
- skewColTypmod = var->vartypmod;
}
}
}
hash_plan = make_hash(inner_plan,
skewTable,
skewColumn,
- skewInherit,
- skewColType,
- skewColTypmod);
+ skewInherit);
/*
* Set Hash node's startup & total costs equal to total cost of input
make_hash(Plan *lefttree,
Oid skewTable,
AttrNumber skewColumn,
- bool skewInherit,
- Oid skewColType,
- int32 skewColTypmod)
+ bool skewInherit)
{
Hash *node = makeNode(Hash);
Plan *plan = &node->plan;
node->skewTable = skewTable;
node->skewColumn = skewColumn;
node->skewInherit = skewInherit;
- node->skewColType = skewColType;
- node->skewColTypmod = skewColTypmod;
return node;
}
*
* If the executor is supposed to try to apply skew join optimization, then
* skewTable/skewColumn/skewInherit identify the outer relation's join key
- * column, from which the relevant MCV statistics can be fetched. Also, its
- * type information is provided to save a lookup.
+ * column, from which the relevant MCV statistics can be fetched.
* ----------------
*/
typedef struct Hash
Oid skewTable; /* outer join key's table OID, or InvalidOid */
AttrNumber skewColumn; /* outer join key's column #, or zero */
bool skewInherit; /* is outer join rel an inheritance tree? */
- Oid skewColType; /* datatype of the outer key column */
- int32 skewColTypmod; /* typmod of the outer key column */
/* all other info is in the parent HashJoin node */
} Hash;