mirror of
https://github.com/postgres/postgres.git
synced 2025-08-21 10:42:50 +03:00
Improve parse representation for MERGE
Separation of parser data structures from executor, as requested by Tom Lane. Further improvements possible. While there, implement error for multiple VALUES clauses via parser to allow line number of error, as requested by Andres Freund. Author: Pavan Deolasee Discussion: https://www.postgresql.org/message-id/CABOikdPpqjectFchg0FyTOpsGXyPoqwgC==OLKWuxgBOsrDDZw@mail.gmail.com
This commit is contained in:
@@ -3444,19 +3444,23 @@ raw_expression_tree_walker(Node *node,
|
||||
return true;
|
||||
if (walker(stmt->join_condition, context))
|
||||
return true;
|
||||
if (walker(stmt->mergeActionList, context))
|
||||
if (walker(stmt->mergeWhenClauses, context))
|
||||
return true;
|
||||
if (walker(stmt->withClause, context))
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case T_MergeAction:
|
||||
case T_MergeWhenClause:
|
||||
{
|
||||
MergeAction *action = (MergeAction *) node;
|
||||
MergeWhenClause *mergeWhenClause = (MergeWhenClause *) node;
|
||||
|
||||
if (walker(action->targetList, context))
|
||||
if (walker(mergeWhenClause->condition, context))
|
||||
return true;
|
||||
if (walker(action->qual, context))
|
||||
if (walker(mergeWhenClause->targetList, context))
|
||||
return true;
|
||||
if (walker(mergeWhenClause->cols, context))
|
||||
return true;
|
||||
if (walker(mergeWhenClause->values, context))
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
Reference in New Issue
Block a user