The AgensGraph Developer Manual has this example and calls it an infinite path:
(a)-[*]->(b)
I assumed, this meant a path of any length, but as it turns out, this is a path with a minimum length of 1.
See:
peter=# match (:node{id:1})-[r:rel*]->(:node{id:1}) return r limit 1;
r
---
(0 rows)
peter=# match (:node{id:1})-[r:rel*0..]->(:node{id:1}) return r limit 1;
r
----
[]
(1 row)
So * means length 1 or longer, and *0.. means any length.
Is this working as intended, or is it a bug?
It should be documented in the AgensGraph Developer Manual what the exact meaning of a bare * is.
I also searched for documentation on openCypher and Neo4j, but I could find no mention of any lower bound.
The AgensGraph Developer Manual has this example and calls it an infinite path:
I assumed, this meant a path of any length, but as it turns out, this is a path with a minimum length of 1. See:
So
*
means length 1 or longer, and*0..
means any length.Is this working as intended, or is it a bug?
It should be documented in the AgensGraph Developer Manual what the exact meaning of a bare
*
is.I also searched for documentation on openCypher and Neo4j, but I could find no mention of any lower bound.