MuhammadTahaNaveed commented on code in PR #2227:
URL: https://github.com/apache/age/pull/2227#discussion_r2399771367
##########
src/backend/parser/cypher_clause.c:
##########
@@ -3278,6 +3278,8 @@ static FuncCall
*prevent_duplicate_edges(cypher_parsestate *cpstate,
ListCell *lc;
List *qualified_function_name;
String *ag_catalog, *edge_fn;
+ bool is_vle_edge = false;
+ int nentities = list_length(entities);
ag_catalog = makeString("ag_catalog");
edge_fn = makeString("_ag_enforce_edge_uniqueness");
Review Comment:
```
edge_fn = makeString("_ag_enforce_edge_uniqueness");
qualified_function_name = list_make2(ag_catalog, edge_fn);
```
These can be removed as this function call is constructed below now.
##########
src/backend/utils/adt/age_vle.c:
##########
@@ -2427,6 +2427,55 @@ Datum age_build_vle_match_edge(PG_FUNCTION_ARGS)
PG_RETURN_POINTER(agtype_value_to_agtype(result.res));
}
+PG_FUNCTION_INFO_V1(_ag_enforce_edge_uniqueness2);
+
+Datum _ag_enforce_edge_uniqueness2(PG_FUNCTION_ARGS)
+{
+ graphid gid1 = AG_GETARG_GRAPHID(0);
+ graphid gid2 = AG_GETARG_GRAPHID(1);
+
+ if (gid1 == gid2)
+ {
+ PG_RETURN_BOOL(false);
+ }
+
Review Comment:
`PG_FREE_IF_COPY` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]