remove functions that are not used (or defined)
authorTomas Vondra <[email protected]>
Tue, 1 Mar 2016 03:26:17 +0000 (04:26 +0100)
committerPavan Deolasee <[email protected]>
Fri, 11 Mar 2016 06:27:24 +0000 (11:57 +0530)
src/backend/optimizer/util/pathnode.c
src/backend/pgxc/plan/planner.c
src/bin/initdb/initdb.c
src/gtm/proxy/proxy_main.c

index bab743aae1b391308cc53e15c3d2de5eaab06de7..f9efa9ff8b305c26c9e3babc8b4b24ec280db206 100644 (file)
@@ -1046,32 +1046,6 @@ redistribute_path(Path *subpath, char distributionType,
 }
 
 
-static JoinPath *
-flatCopyJoinPath(JoinPath *pathnode)
-{
-       JoinPath   *newnode;
-       size_t          size = 0;
-       switch(nodeTag(pathnode))
-       {
-               case T_NestPath:
-                       size = sizeof(NestPath);
-                       break;
-               case T_MergePath:
-                       size = sizeof(MergePath);
-                       break;
-               case T_HashPath:
-                       size = sizeof(HashPath);
-                       break;
-               default:
-                       elog(ERROR, "unrecognized node type: %d", (int) nodeTag(pathnode));
-                       break;
-       }
-       newnode = (JoinPath *) palloc(size);
-       memcpy(newnode, pathnode, size);
-       return newnode;
-}
-
-
 /*
  * Analyze join parameters and set distribution of the join node.
  * If there are possible alternate distributions the respective pathes are
index f6121568aecd2f92be8ffb636550755854869e44..ff8b774ef20082c8d08cd09d8165c19a2b0e912d 100644 (file)
@@ -64,7 +64,6 @@
 /* Forbid unsafe SQL statements */
 bool           StrictStatementChecking = true;
 
-static void validate_part_col_updatable(const Query *query);
 static bool contains_temp_tables(List *rtable);
 static PlannedStmt *pgxc_FQS_planner(Query *query, ParamListInfo boundParams);
 static RemoteQuery *pgxc_FQS_create_remote_plan(Query *query,
@@ -428,56 +427,3 @@ pgxc_FQS_create_remote_plan(Query *query, ExecNodes *exec_nodes, bool is_exec_di
 
        return query_step;
 }
-
-/*
- * validate whether partition column of a table is being updated
- */
-static void
-validate_part_col_updatable(const Query *query)
-{
-       RangeTblEntry *rte;
-       RelationLocInfo *rel_loc_info;
-       ListCell *lc;
-
-       /* Make sure there is one table at least */
-       if (query->rtable == NULL)
-               return;
-
-       rte = (RangeTblEntry *) list_nth(query->rtable, query->resultRelation - 1);
-
-
-       if (rte != NULL && rte->relkind != RELKIND_RELATION)
-               /* Bad relation type */
-               return;
-
-       /* See if we have the partitioned case. */
-       rel_loc_info = GetRelationLocInfo(rte->relid);
-
-       /* Any column updation on local relations is fine */
-       if (!rel_loc_info)
-               return;
-
-       /* Only relations distributed by value can be checked */
-       if (IsRelationDistributedByValue(rel_loc_info))
-       {
-               /* It is a partitioned table, check partition column in targetList */
-               foreach(lc, query->targetList)
-               {
-                       TargetEntry *tle = (TargetEntry *) lfirst(lc);
-
-                       /* Nothing to do for a junk entry */
-                       if (tle->resjunk)
-                               continue;
-
-                       /*
-                        * See if we have a constant expression comparing against the
-                        * designated partitioned column
-                        */
-                       if (strcmp(tle->resname, GetRelationDistribColumn(rel_loc_info)) == 0)
-                               ereport(ERROR,
-                                               (errcode(ERRCODE_INVALID_COLUMN_REFERENCE),
-                                               (errmsg("Partition column can't be updated in current version"))));
-               }
-       }
-}
-
index adfe932b8c131a11f4c84aa643ec75a0c023a1e3..69c75611d660432175e52d3f0bba39bc1d4b6919 100644 (file)
@@ -270,9 +270,6 @@ static void setup_dictionary(void);
 static void setup_privileges(void);
 static void set_info_version(void);
 static void setup_schema(void);
-#ifdef XCP
-static void setup_storm(void);
-#endif
 static void load_plpgsql(void);
 static void vacuum_db(void);
 static void make_template0(void);
@@ -2312,46 +2309,6 @@ setup_schema(void)
        check_ok();
 }
 
-#ifdef XCP
-/*
- * load storm catalog and populate from features file
- */
-static void
-setup_storm(void)
-{
-        PG_CMD_DECL;
-        char      **line;
-        char      **lines;
-
-        fputs(_("creating storm catalog... "), stdout);
-        fflush(stdout);
-
-        lines = readfile(storm_cat_file);
-
-        /*
-         * We use -j here to avoid backslashing stuff in storm_catalog.sql
-         */
-        snprintf(cmd, sizeof(cmd),
-                         "\"%s\" %s -j template1 >%s",
-                         backend_exec, backend_options,
-                         DEVNULL);
-
-        PG_CMD_OPEN;
-
-        for (line = lines; *line != NULL; line++)
-        {
-                PG_CMD_PUTS(*line);
-                free(*line);
-        }
-
-        free(lines);
-
-        PG_CMD_CLOSE;
-
-        check_ok();
-}
-#endif
-
 /*
  * load PL/pgsql server-side language
  */
index 42e90eb7c563771183b6caf39d341c5e5503aa9f..a13e93ddc0856e1b67c48bb4869c4e40fd8259c1 100644 (file)
@@ -144,8 +144,6 @@ static void GTMProxy_HandleDisconnect(GTMProxy_ConnectionInfo *conninfo, GTM_Con
 
 static void GTMProxy_ProxyCommand(GTMProxy_ConnectionInfo *conninfo,
                GTM_Conn *gtm_conn, GTM_MessageType mtype, StringInfo message);
-static void GTMProxy_ProxyPGXCNodeCommand(GTMProxy_ConnectionInfo *conninfo,
-               GTM_Conn *gtm_conn, GTM_MessageType mtype, GTMProxy_CommandData cmd_data);
 
 static void ProcessCommand(GTMProxy_ConnectionInfo *conninfo,
                GTM_Conn *gtm_conn, StringInfo input_message);