Skip to content

Commit

Permalink
Add brackets to scope some case statements
Browse files Browse the repository at this point in the history
This fixes some compile-time errors that occur if
PostgreSQL is configured with the --with-llvm option.
  • Loading branch information
rafsun42 committed Feb 13, 2024
1 parent 5967187 commit f8fb72e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/parser/cypher_label_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ List *get_label_expr_relations(cypher_label_expr *label_expr,

case LABEL_EXPR_TYPE_AND:
case LABEL_EXPR_TYPE_OR:
{
List *reloids;
List *(*merge_lists)(List *, const List *);
ListCell *lc;
Expand Down Expand Up @@ -322,7 +323,7 @@ List *get_label_expr_relations(cypher_label_expr *label_expr,
}
}
return reloids;

}
default:
elog(ERROR, "invalid cypher_label_expr type");
return NIL;
Expand Down Expand Up @@ -378,6 +379,7 @@ char *label_expr_relname(cypher_label_expr *label_expr, char label_expr_kind)
return (char *)strVal(linitial(label_expr->label_names));

case LABEL_EXPR_TYPE_AND:
{
/*
* generates a name for intersection relation
* i.e. for CREATE (:A:B:C), _agr_ABC
Expand All @@ -401,6 +403,7 @@ char *label_expr_relname(cypher_label_expr *label_expr, char label_expr_kind)
pfree(relname_strinfo);

return relname;
}

case LABEL_EXPR_TYPE_OR:
elog(ERROR, "label expression type OR cannot have a table");
Expand Down

0 comments on commit f8fb72e

Please sign in to comment.