diff options
author | Tomas Vondra | 2016-03-01 03:26:17 +0000 |
---|---|---|
committer | Pavan Deolasee | 2016-10-18 10:00:51 +0000 |
commit | 986f0339fa0b959d7e1560b4be5781d002af50ae (patch) | |
tree | 27442be5b381fde788759b9a4b7d7147cdee4a71 | |
parent | e474afdd5cd7af005f3cbc2f77305644c7d1947d (diff) |
remove functions that are not used (or defined)
-rw-r--r-- | src/backend/optimizer/util/pathnode.c | 26 | ||||
-rw-r--r-- | src/backend/pgxc/plan/planner.c | 54 | ||||
-rw-r--r-- | src/bin/initdb/initdb.c | 43 | ||||
-rw-r--r-- | src/gtm/proxy/proxy_main.c | 2 |
4 files changed, 0 insertions, 125 deletions
diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index d46faf40cb..3c5d6638bf 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -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 diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c index f6121568ae..ff8b774ef2 100644 --- a/src/backend/pgxc/plan/planner.c +++ b/src/backend/pgxc/plan/planner.c @@ -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")))); - } - } -} - diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index adfe932b8c..69c75611d6 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -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 */ diff --git a/src/gtm/proxy/proxy_main.c b/src/gtm/proxy/proxy_main.c index 42e90eb7c5..a13e93ddc0 100644 --- a/src/gtm/proxy/proxy_main.c +++ b/src/gtm/proxy/proxy_main.c @@ -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); |