]> granicus.if.org Git - postgresql/commitdiff
Remove no-longer-needed fields of Hash plan nodes.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 14 May 2017 15:07:40 +0000 (11:07 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 14 May 2017 15:07:40 +0000 (11:07 -0400)
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

src/backend/nodes/copyfuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/include/nodes/plannodes.h

index d13a6fc03f03e88128f9dae55e00c37342464d5b..6ad38443a03b9621a8d010b93e929e99a4f579cb 100644 (file)
@@ -1052,8 +1052,6 @@ _copyHash(const Hash *from)
        COPY_SCALAR_FIELD(skewTable);
        COPY_SCALAR_FIELD(skewColumn);
        COPY_SCALAR_FIELD(skewInherit);
-       COPY_SCALAR_FIELD(skewColType);
-       COPY_SCALAR_FIELD(skewColTypmod);
 
        return newnode;
 }
index 3d5b09aeeeb2571a3d77236341df1225f1acaa81..8d9ff63931c0a47916bd77f5bfcbf3d720218e17 100644 (file)
@@ -898,8 +898,6 @@ _outHash(StringInfo str, const Hash *node)
        WRITE_OID_FIELD(skewTable);
        WRITE_INT_FIELD(skewColumn);
        WRITE_BOOL_FIELD(skewInherit);
-       WRITE_OID_FIELD(skewColType);
-       WRITE_INT_FIELD(skewColTypmod);
 }
 
 static void
index f9a227e23794e62c3f4b7ce4f75964ccb340f1ad..e24f5d672637f3698b545df0d58a15bfba840654 100644 (file)
@@ -2187,8 +2187,6 @@ _readHash(void)
        READ_OID_FIELD(skewTable);
        READ_INT_FIELD(skewColumn);
        READ_BOOL_FIELD(skewInherit);
-       READ_OID_FIELD(skewColType);
-       READ_INT_FIELD(skewColTypmod);
 
        READ_DONE();
 }
index 52daf43c8193ae38912a70f6d40b98a861477d08..1c252c0ef55166f044f3bbea1c0db08ddf5b0595 100644 (file)
@@ -224,9 +224,7 @@ static HashJoin *make_hashjoin(List *tlist,
 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,
@@ -4065,8 +4063,6 @@ create_hashjoin_plan(PlannerInfo *root,
        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
@@ -4153,8 +4149,6 @@ create_hashjoin_plan(PlannerInfo *root,
                                skewTable = rte->relid;
                                skewColumn = var->varattno;
                                skewInherit = rte->inh;
-                               skewColType = var->vartype;
-                               skewColTypmod = var->vartypmod;
                        }
                }
        }
@@ -4165,9 +4159,7 @@ create_hashjoin_plan(PlannerInfo *root,
        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
@@ -5427,9 +5419,7 @@ static Hash *
 make_hash(Plan *lefttree,
                  Oid skewTable,
                  AttrNumber skewColumn,
-                 bool skewInherit,
-                 Oid skewColType,
-                 int32 skewColTypmod)
+                 bool skewInherit)
 {
        Hash       *node = makeNode(Hash);
        Plan       *plan = &node->plan;
@@ -5442,8 +5432,6 @@ make_hash(Plan *lefttree,
        node->skewTable = skewTable;
        node->skewColumn = skewColumn;
        node->skewInherit = skewInherit;
-       node->skewColType = skewColType;
-       node->skewColTypmod = skewColTypmod;
 
        return node;
 }
index 164105a3a9d55053c0cb77a4d62b63f2d31e2b13..0b08e49dd4b4c05cbded103643576d67767c2c36 100644 (file)
@@ -858,8 +858,7 @@ typedef struct GatherMerge
  *
  * 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
@@ -868,8 +867,6 @@ 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;