* strategies.
*
* If the required operators do not exist, we can not construct
- * quals linking an edge to its adjacent vertexes.
+ * quals linking an edge to its adjacent vertices.
*/
get_atttypetypmodcoll(RelationGetRelid(edge_rel), keyattnums[i], &keytype, &keytypmod, &keycoll);
get_atttypetypmodcoll(RelationGetRelid(ref_rel), refattnums[i], &reftype, &reftypmod, &refcoll);
/*
* If collations of key attribute and referenced attribute are
* different, an edge may end up being adjacent to undesired
- * vertexes. Prohibit such a case.
+ * vertices. Prohibit such a case.
*
* PK/FK allows different collations as long as they are
* deterministic for backward compatibility. But we can be a bit
* returned.
*
* Between every two vertex elements in the path there is an edge element that
- * connects them. An edge connects two vertexes identified by the source and
+ * connects them. An edge connects two vertices identified by the source and
* destination keys respectively. The connection between an edge and its
* adjacent vertex is naturally computed as an equi-join between edge and vertex
* table on their respective keys. Hence the query representing one path
*
* If multiple edge patterns share the same variable name, they
* constrain the adjacent vertex patterns since an edge can connect
- * only one pair of vertexes. These adjacent vertex patterns need to
+ * only one pair of vertices. These adjacent vertex patterns need to
* be merged even though they have different variables. Such element
* patterns form a walk of graph where vertex and edges are repeated.
* For example, in (a)-[b]->(c)<-[b]-(d), (a) and (d) represent the
if (prev_pf->dest_pf && prev_pf->dest_pf != pf)
ereport(ERROR,
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("an edge cannot connect more than two vertexes even in a cyclic pattern"));
+ errmsg("an edge cannot connect more than two vertices even in a cyclic pattern"));
prev_pf->dest_pf = pf;
}
else if (prev_pf->kind == EDGE_PATTERN_LEFT)
if (prev_pf->src_pf && prev_pf->src_pf != pf)
ereport(ERROR,
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("an edge cannot connect more than two vertexes even in a cyclic pattern"));
+ errmsg("an edge cannot connect more than two vertices even in a cyclic pattern"));
prev_pf->src_pf = pf;
}
else
if (pf->src_pf && pf->src_pf != prev_pf)
ereport(ERROR,
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("an edge cannot connect more than two vertexes even in a cyclic pattern"));
+ errmsg("an edge cannot connect more than two vertices even in a cyclic pattern"));
pf->src_pf = prev_pf;
}
else if (pf->kind == EDGE_PATTERN_LEFT)
if (pf->dest_pf && pf->dest_pf != prev_pf)
ereport(ERROR,
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("an edge cannot connect more than two vertexes even in a cyclic pattern"));
+ errmsg("an edge cannot connect more than two vertices even in a cyclic pattern"));
pf->dest_pf = prev_pf;
}
else
VERTEX TABLES (
v1
LABEL vl1 PROPERTIES (vname, vprop1)
- LABEL l1 PROPERTIES (vname AS elname), -- label shared by vertexes as well as edges
+ LABEL l1 PROPERTIES (vname AS elname), -- label shared by vertices as well as edges
v2 KEY (id1, id2)
LABEL vl2 PROPERTIES (vname, vprop2, 'vl2_prop'::varchar(10) AS lprop1)
LABEL vl3 PROPERTIES (vname, vprop1, 'vl2_prop'::varchar(10) AS lprop1)
(1 row)
SELECT * FROM GRAPH_TABLE (g1 MATCH (a)-[b]->(c)-[b]->(d) COLUMNS (a.vname AS aname, b.ename AS bname, c.vname AS cname, d.vname AS dname)); --error
-ERROR: an edge cannot connect more than two vertexes even in a cyclic pattern
+ERROR: an edge cannot connect more than two vertices even in a cyclic pattern
-- the looping edge should be reported only once even when edge pattern with any direction is used
SELECT * FROM GRAPH_TABLE (g1 MATCH (a)-[c]-(a) COLUMNS (a.vname AS self, c.ename AS loop_name));
self | loop_name
30 | 300 | 10
(3 rows)
--- edges from the same vertex in both directions connecting to other vertexes in the same table
+-- edges from the same vertex in both directions connecting to other vertices in the same table
SELECT * FROM GRAPH_TABLE (g4 MATCH (s)-[e]-(d) WHERE s.id = 3 COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3;
val | val | val
-----+-----+-----
VERTEX TABLES (
v1
LABEL vl1 PROPERTIES (vname, vprop1)
- LABEL l1 PROPERTIES (vname AS elname), -- label shared by vertexes as well as edges
+ LABEL l1 PROPERTIES (vname AS elname), -- label shared by vertices as well as edges
v2 KEY (id1, id2)
LABEL vl2 PROPERTIES (vname, vprop2, 'vl2_prop'::varchar(10) AS lprop1)
LABEL vl3 PROPERTIES (vname, vprop1, 'vl2_prop'::varchar(10) AS lprop1)
DESTINATION KEY (dest) REFERENCES ptnv(id)
);
SELECT * FROM GRAPH_TABLE (g4 MATCH (s IS ptnv)-[e IS ptne]->(d IS ptnv) COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3;
--- edges from the same vertex in both directions connecting to other vertexes in the same table
+-- edges from the same vertex in both directions connecting to other vertices in the same table
SELECT * FROM GRAPH_TABLE (g4 MATCH (s)-[e]-(d) WHERE s.id = 3 COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3;
SELECT * FROM GRAPH_TABLE (g4 MATCH (s WHERE s.id = 3)-[e]-(d) COLUMNS (s.val, e.val, d.val)) ORDER BY 1, 2, 3;