Skip to content
Browse files
Corrects abnormal termination due to incorrect variable in Set Clause. (

Previously, `ColumnRef` may come according to the Parser rule. but, this case is not considered.
Therefore, add logic to detect these errors.
  • Loading branch information
emotionbug committed Dec 22, 2021
1 parent a04059f commit c0948142f7ed5b3b2b97243292bb38e192af0b25
Showing 1 changed file with 11 additions and 1 deletion.
@@ -747,10 +747,20 @@ cypher_update_information *transform_cypher_set_item_list(
TargetEntry *target_item;
cypher_update_item *item;
ColumnRef *ref;
A_Indirection *ind = (A_Indirection *)set_item->prop;
A_Indirection *ind;
char *variable_name, *property_name;
Value *property_node, *variable_node;

// ColumnRef may come according to the Parser rule.
if (!IsA(set_item->prop, A_Indirection))
errmsg("SET clause expects a variable name"),
parser_errposition(pstate, set_item->location)));

ind = (A_Indirection *)set_item->prop;
item = make_ag_node(cypher_update_item);

if (!is_ag_node(lfirst(li), cypher_set_item))

0 comments on commit c094814

Please sign in to comment.