Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: operator does not exist: ag_catalog.agtype + ag_catalog.agtype #299

Open
Sanjeetkumar163 opened this issue Sep 15, 2022 · 1 comment
Labels
question Further information is requested

Comments

@Sanjeetkumar163
Copy link

Sanjeetkumar163 commented Sep 15, 2022

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.

@Sanjeetkumar163 Sanjeetkumar163 added the question Further information is requested label Sep 15, 2022
@jrgemignani
Copy link
Contributor

jrgemignani commented Sep 15, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants