age
age copied to clipboard
Unexpected Error: function `ag_catalog.age_startnode` does not exist
When running the following query against an empty database:
MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0
I encountered the following error:
pq: function ag_catalog.age_startnode(agtype, graph._ag_label_edge) does not exist
I believe the query mentioned above is semantically and syntactically correct and thus no error should be thrown here.
I encountered this issue when testing queries against the apache/age:PG13_latest docker image.
Steps to reproduce
Run the following query and observe it throws an error:
MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0
Expected behavior
The query should run successfully
Actual behavior
The query fails with the error message function ag_catalog.age_startnode(agtype, graph._ag_label_edge) does not exist
.
Hi, using the same docker environment, haven't been able to reproduce same error. However, I do still get an error:
postgresDB=# SELECT * FROM cypher('test', $$
MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0
$$) as (v agtype);
ERROR: function ag_catalog.age_startnode(agtype, test._ag_label_edge) does not exist
LINE 2: MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Typecasting x
as x::edge
works for me:
MATCH ()<-[x]-(), ()-[*1{n0:startNode(x::edge).n1}]->() RETURN 0
$$) as (v agtype);
v
---
(0 rows)
@DominicWuest It is great that you found a bug However, you need to provide an actual dataset, along with a description on how you access AGE in order to help others understand and potentially fix it.
When running the following query:
MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0
When running against what data? Using what interface/driver to AGE? Using what environment/OS?
Thanks for looking into this @jrgemignani! This query was run against an empty database, I have edited the issue such that this is evident. Since the error arises on the server side, I thought that the driver shouldn't have any influence on this, am I mistaken here? I ran these queries against the apache/age:PG13_latest docker image. As of writing this comment, the OS should thus be debian buster.
This issue is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.
@DominicWuest I believe this is no longer an issue -
psql-16.2-5432-pgsql=# drop extension age; create extension age; load 'age'; set search_path TO ag_catalog;
ERROR: extension "age" does not exist
CREATE EXTENSION
LOAD
SET
psql-16.2-5432-pgsql=# select * from create_graph('test');
NOTICE: graph "test" has been created
create_graph
--------------
(1 row)
psql-16.2-5432-pgsql=# select * from cypher('test', $$ MATCH ()<-[x]-(), ()-[*1{n0:startNode(x).n1}]->() RETURN 0 $$) as (result agtype);
result
--------
(0 rows)
psql-16.2-5432-pgsql=#
Please check against latest DH releases.
Issue was resolved.