1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +03:00

Revert "Modified files for MERGE"

This reverts commit 354f13855e.
This commit is contained in:
Simon Riggs
2018-04-02 21:34:15 +01:00
parent 354f13855e
commit 7cf8a5c302
82 changed files with 165 additions and 2570 deletions

View File

@ -2146,16 +2146,6 @@ expression_tree_walker(Node *node,
return true;
}
break;
case T_MergeAction:
{
MergeAction *action = (MergeAction *) node;
if (walker(action->targetList, context))
return true;
if (walker(action->qual, context))
return true;
}
break;
case T_JoinExpr:
{
JoinExpr *join = (JoinExpr *) node;
@ -2265,10 +2255,6 @@ query_tree_walker(Query *query,
return true;
if (walker((Node *) query->onConflict, context))
return true;
if (walker((Node *) query->mergeSourceTargetList, context))
return true;
if (walker((Node *) query->mergeActionList, context))
return true;
if (walker((Node *) query->returningList, context))
return true;
if (walker((Node *) query->jointree, context))
@ -2946,18 +2932,6 @@ expression_tree_mutator(Node *node,
return (Node *) newnode;
}
break;
case T_MergeAction:
{
MergeAction *action = (MergeAction *) node;
MergeAction *newnode;
FLATCOPY(newnode, action, MergeAction);
MUTATE(newnode->qual, action->qual, Node *);
MUTATE(newnode->targetList, action->targetList, List *);
return (Node *) newnode;
}
break;
case T_JoinExpr:
{
JoinExpr *join = (JoinExpr *) node;
@ -3109,8 +3083,6 @@ query_tree_mutator(Query *query,
MUTATE(query->targetList, query->targetList, List *);
MUTATE(query->withCheckOptions, query->withCheckOptions, List *);
MUTATE(query->onConflict, query->onConflict, OnConflictExpr *);
MUTATE(query->mergeSourceTargetList, query->mergeSourceTargetList, List *);
MUTATE(query->mergeActionList, query->mergeActionList, List *);
MUTATE(query->returningList, query->returningList, List *);
MUTATE(query->jointree, query->jointree, FromExpr *);
MUTATE(query->setOperations, query->setOperations, Node *);
@ -3252,9 +3224,9 @@ query_or_expression_tree_mutator(Node *node,
* boundaries: we descend to everything that's possibly interesting.
*
* Currently, the node type coverage here extends only to DML statements
* (SELECT/INSERT/UPDATE/DELETE/MERGE) and nodes that can appear in them,
* because this is used mainly during analysis of CTEs, and only DML
* statements can appear in CTEs.
* (SELECT/INSERT/UPDATE/DELETE) and nodes that can appear in them, because
* this is used mainly during analysis of CTEs, and only DML statements can
* appear in CTEs.
*/
bool
raw_expression_tree_walker(Node *node,
@ -3434,20 +3406,6 @@ raw_expression_tree_walker(Node *node,
return true;
}
break;
case T_MergeStmt:
{
MergeStmt *stmt = (MergeStmt *) node;
if (walker(stmt->relation, context))
return true;
if (walker(stmt->source_relation, context))
return true;
if (walker(stmt->join_condition, context))
return true;
if (walker(stmt->mergeActionList, context))
return true;
}
break;
case T_SelectStmt:
{
SelectStmt *stmt = (SelectStmt *) node;