age
age copied to clipboard
ERROR: operator does not exist: ag_catalog.agtype + ag_catalog.agtype
I am getting an error when I ran the below queries in PostgreSQL-11:
SELECT * FROM ag_catalog.cypher('graph_path', $$ CREATE (:L {a: 1, b: 2, c: 3}), (:L {a: 2, b: 3, c: 1}), (:L {a: 3, b: 1, c: 2}) $$) as (a ag_catalog.agtype);
SELECT * FROM ag_catalog.cypher('graph_path', $$ MATCH (x:L) RETURN (x.a + x.b + x.c) + count(*) + count(*), x.a + x.b + x.c $$) as (count ag_catalog.agtype, key ag_catalog.agtype);
ERROR: operator does not exist: ag_catalog.agtype + ag_catalog.agtype LINE 1: ...her('graph_path', $$ MATCH (x:L) RETURN (x.a + x.b + x.... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
psql-11.5-5432-pgsql=# SELECT create_graph('graph_path');
NOTICE: graph "graph_path" has been created
create_graph
--------------
(1 row)
psql-11.5-5432-pgsql=# SELECT * FROM ag_catalog.cypher('graph_path', $$ CREATE (:L {a: 1, b: 2, c: 3}), (:L {a: 2, b: 3, c: 1}), (:L {a: 3, b: 1, c: 2}) $$) as (a ag_catalog.agtype);
a
---
(0 rows)
psql-11.5-5432-pgsql=# SELECT * FROM ag_catalog.cypher('graph_path', $$ MATCH (x:L) RETURN (x.a + x.b + x.c) + count(*) + count(*), x.a + x.b + x.c $$) as (count ag_catalog.agtype, key ag_catalog.agtype);
count | key
-------+-----
12 | 6
(1 row)
psql-11.5-5432-pgsql=#
This works for me,... how did you load the extension?